Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to TinyURL

Scalekit connector
Open markdown

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

Tools
21
What they doRead · write · destructive
13 · 7 · 113 read7 write1 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 TinyURL connection

    In AgentKit > Connections, create a TinyURL 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 = 'tinyurl'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize TinyURL:', 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: 'tinyurl_analytics_general_get',
    toolInput: { from: '2025-01-01 00:00:00' },
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their TinyURL 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
  • tinyurl_analytics_general_getGet browser, operating system and device breakdowns for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account.Read-only

    Get Browser, OS and Device Stats

    Get browser, operating system and device breakdowns for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account. Returns data with click counts by browser, os and device. Use the other analytics tools for other breakdowns. Click analytics need a paid TinyURL plan.

    Inputs

    fromstringrequired
    Start of the report as a date-time. Example: 2025-01-01 00:00:00.
    aliasstring
    Limit the report to one TinyURL alias. Example: myexamplelink.
    tagstring
    Limit the report to TinyURLs with this tag. Example: campaign-q1.
    tostring
    End of the report as a date-time; defaults to now. Example: 2025-01-31 23:59:59.
  • tinyurl_analytics_hours_getGet click counts by hour of the day for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account.Read-only

    Get Hour Popularity

    Get click counts by hour of the day for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account. Returns data with clicks per hour. Use the other analytics tools for other breakdowns. Click analytics need a paid TinyURL plan.

    Inputs

    fromstringrequired
    Start of the report as a date-time. Example: 2025-01-01 00:00:00.
    aliasstring
    Limit the report to one TinyURL alias. Example: myexamplelink.
    tagstring
    Limit the report to TinyURLs with this tag. Example: campaign-q1.
    tostring
    End of the report as a date-time; defaults to now. Example: 2025-01-31 23:59:59.
  • tinyurl_analytics_languages_getGet the top visitor languages for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account.Read-only

    Get Top Languages

    Get the top visitor languages for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account. Returns data with languages and their click counts. Use the other analytics tools for other breakdowns. Click analytics need a paid TinyURL plan.

    Inputs

    fromstringrequired
    Start of the report as a date-time. Example: 2025-01-01 00:00:00.
    aliasstring
    Limit the report to one TinyURL alias. Example: myexamplelink.
    tagstring
    Limit the report to TinyURLs with this tag. Example: campaign-q1.
    tostring
    End of the report as a date-time; defaults to now. Example: 2025-01-31 23:59:59.
  • tinyurl_analytics_locations_getGet click locations by country, or by area inside one country for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account.Read-only

    Get Click Locations

    Get click locations by country, or by area inside one country for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account. Returns data with locations and their click counts. Use the other analytics tools for other breakdowns. Click analytics need a paid TinyURL plan.

    Inputs

    fromstringrequired
    Start of the report as a date-time. Example: 2025-01-01 00:00:00.
    regionstringrequired
    world for a breakdown by country, or a two-letter ISO 3166-1 country code for areas inside that country. Example: US.default world
    aliasstring
    Limit the report to one TinyURL alias. Example: myexamplelink.
    tagstring
    Limit the report to TinyURLs with this tag. Example: campaign-q1.
    tostring
    End of the report as a date-time; defaults to now. Example: 2025-01-31 23:59:59.
  • tinyurl_analytics_raw_listGet raw click logs for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account.Read-only

    List Raw Click Logs

    Get raw click logs for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account. Returns data[] with one entry per click, including time, referrer, browser, operating system, device and location. Use the other analytics tools for other breakdowns. Click analytics need a paid TinyURL plan.

    Inputs

    fromstringrequired
    Start of the report as a date-time. Example: 2025-01-01 00:00:00.
    aliasstring
    Limit the report to one TinyURL alias. Example: myexamplelink.
    tagstring
    Limit the report to TinyURLs with this tag. Example: campaign-q1.
    tostring
    End of the report as a date-time; defaults to now. Example: 2025-01-31 23:59:59.
  • tinyurl_analytics_sources_getGet the top referring sources for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account.Read-only

    Get Top Sources

    Get the top referring sources for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account. Returns data with sources and their click counts. Use the other analytics tools for other breakdowns. Click analytics need a paid TinyURL plan.

    Inputs

    fromstringrequired
    Start of the report as a date-time. Example: 2025-01-01 00:00:00.
    aliasstring
    Limit the report to one TinyURL alias. Example: myexamplelink.
    tagstring
    Limit the report to TinyURLs with this tag. Example: campaign-q1.
    tostring
    End of the report as a date-time; defaults to now. Example: 2025-01-31 23:59:59.
  • tinyurl_analytics_timeline_getGet click counts over time for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account.Read-only

    Get Click Timeline

    Get click counts over time for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account. Returns data with click counts per interval. Use the other analytics tools for other breakdowns. Click analytics need a paid TinyURL plan.

    Inputs

    fromstringrequired
    Start of the report as a date-time. Example: 2025-01-01 00:00:00.
    aliasstring
    Limit the report to one TinyURL alias. Example: myexamplelink.
    intervalstring
    Time bucket: minute, hour, day, week or month. Example: day.one of minutehourdayweekmonth
    tagstring
    Limit the report to TinyURLs with this tag. Example: campaign-q1.
    tostring
    End of the report as a date-time; defaults to now. Example: 2025-01-31 23:59:59.
  • tinyurl_analytics_weekdays_getGet click counts by day of the week for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account.Read-only

    Get Weekday Popularity

    Get click counts by day of the week for clicks on your TinyURLs in a date range, for one alias, one tag or the whole account. Returns data with clicks per weekday. Use the other analytics tools for other breakdowns. Click analytics need a paid TinyURL plan.

    Inputs

    fromstringrequired
    Start of the report as a date-time. Example: 2025-01-01 00:00:00.
    aliasstring
    Limit the report to one TinyURL alias. Example: myexamplelink.
    tagstring
    Limit the report to TinyURLs with this tag. Example: campaign-q1.
    tostring
    End of the report as a date-time; defaults to now. Example: 2025-01-31 23:59:59.