Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Tapfiliate

Scalekit connector
Open markdown

The Tapfiliate connector lets your AI agent act in each user's Tapfiliate account. Each user connects their own Tapfiliate API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 60 tools.

Tools
60
What they doRead · write · destructive
28 · 21 · 1128 read21 write11 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Tapfiliate connection

    In AgentKit > Connections, create a Tapfiliate connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'tapfiliate'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Tapfiliate:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'tapfiliate_affiliate_groups_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Tapfiliate credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • tapfiliate_affiliate_balances_getGet what you owe one affiliate per currency: approved commissions minus payments made.Read-only

    Get Affiliate Balances

    Get what you owe one affiliate per currency: approved commissions minus payments made. Returns balances by currency. Use tapfiliate_balances_list for all affiliates.

    Inputs

    affiliate_idstringrequired
    Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.
  • tapfiliate_affiliate_getGet one affiliate by ID with their contact details, company, address and meta data.Read-only

    Get Affiliate

    Get one affiliate by ID with their contact details, company, address and meta data. Returns the affiliate object.

    Inputs

    affiliate_idstringrequired
    Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.
  • tapfiliate_affiliate_groups_listList affiliate groups, newest first, 25 per page.Read-only

    List Affiliate Groups

    List affiliate groups, newest first, 25 per page. Returns group IDs, titles and affiliate counts.

    Inputs

    pageinteger
    Page number of results, 25 per page, starting at 1. Example: 1.
  • tapfiliate_affiliate_meta_data_getGet all meta data stored on an affiliate as one key/value object.Read-only

    Get Affiliate Meta Data

    Get all meta data stored on an affiliate as one key/value object. Returns the object ({} when empty).

    Inputs

    affiliate_idstringrequired
    Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.
  • tapfiliate_affiliate_notes_listList the internal notes your team wrote on an affiliate, newest first.Read-only

    List Affiliate Notes

    List the internal notes your team wrote on an affiliate, newest first. Returns notes with message, author and date.

    Inputs

    affiliate_idstringrequired
    Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.
  • tapfiliate_affiliate_payments_listList the payments made to one affiliate, newest first, 25 per page, excluding canceled ones.Read-only

    List Affiliate Payments

    List the payments made to one affiliate, newest first, 25 per page, excluding canceled ones. Returns payments with amount, currency and date.

    Inputs

    affiliate_idstringrequired
    Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.
    pageinteger
    Page number of results, 25 per page, starting at 1. Example: 1.
  • tapfiliate_affiliate_programs_listList the programs an affiliate belongs to with their approval status, coupon and referral link, 25 per page.Read-only

    List Affiliate Programs

    List the programs an affiliate belongs to with their approval status, coupon and referral link, 25 per page. Returns program memberships.

    Inputs

    affiliate_idstringrequired
    Affiliate ID, from tapfiliate_affiliates_list. Example: janejameson.
    pageinteger
    Page number of results, 25 per page, starting at 1. Example: 1.
  • tapfiliate_affiliate_prospect_getGet one affiliate prospect by ID with their referral link.Read-only

    Get Affiliate Prospect

    Get one affiliate prospect by ID with their referral link. Returns the prospect object.

    Inputs

    affiliate_prospect_idstringrequired
    The id of the affiliate prospect. Example: jimprosper.