Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Reddit

Scalekit connector
Open markdown

The Reddit connector lets your AI agent act in each user's Reddit account. Each user signs in to Reddit once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 105 tools.

Tools
105
What they doRead · write · destructive
62 · 36 · 762 read36 write7 destructive
Users sign in with
OAuth app
Your own Reddit app

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 Reddit connection

    In AgentKit > Connections, create a Reddit connection and copy its redirect URI. The name you give it is the connection_name your code passes. See Configure connections.

  4. Register an OAuth app

    Reddit connections use your own OAuth app. Register one with Reddit and add the redirect URI you copied.

    Then enter the app's Client ID and Client Secret on the Reddit connection.

    Console steps with screenshots

    Register your Reddit app credentials with Scalekit so it can manage the OAuth 2.0 authentication flow and token lifecycle on your behalf. You’ll need a client ID, a client secret, and a redirect URI from a Reddit app.

    Reddit exposes two dashboards for creating an OAuth app, depending on the type of Reddit account you use. Pick the tab that matches your account.

    1. Create a Reddit OAuth connection in Scalekit

      • In Scalekit dashboard, go to AgentKit > Connections > Create Connection. Search for Reddit and click Create.

      • In the Configure Reddit Connection panel, copy the Redirect URI. It looks like https://<SCALEKIT_ENVIRONMENT_URL>/sso/v1/oauth/<CONNECTION_ID>/callback. You’ll paste this into your Reddit app in the next step.

    2. Create an app in Reddit

      • Go to reddit.com/prefs/apps and sign in with the Reddit account you want the connector to act as.

      • Click create another app… (or create an app if this is your first one).

      • Fill in the app form:

        FieldValue
        nameA name for your app, for example Agent Auth
        App typeweb app
        redirect uriPaste the Redirect URI you copied from Scalekit
      • Click create app. Reddit adds it under developed applications, showing the app’s client ID directly under its name.

        Reddit prefs/apps page showing the developed applications list with an app's client ID and an edit link

      • Click edit on the app to reveal the secret field alongside the client ID.

    3. Add credentials in Scalekit

      • In Scalekit dashboard, go to AgentKit > Connections and open the Reddit connection you created.

      • Enter your credentials:

        • Client ID — the App ID (Business Manager) or the string under the app’s name (reddit.com/prefs/apps)
        • Client Secret — the secret you revealed in the previous step
        • Scopes — select the permissions your agent needs, for example identity, read, and submit
      • Click Save.

  5. 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 = 'reddit'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Reddit:', 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: 'reddit_best',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • reddit_bestGet the best posts from the authenticated user's personalized front page.Read-only

    Get Best Posts

    Get the best posts from the authenticated user's personalized front page. Requires the read scope.

    Inputs

    afterstring
    Fullname of the last post for pagination
    countinteger
    Number of items already seen for accurate pagination
    limitinteger
    Maximum number of posts to return (default 25, max 100)

    Also accepts schema_version and tool_version to pin a version.

  • reddit_inbox_getGet all messages in the current user's inbox, including private messages, comment replies, and post replies.Read-only

    Get Inbox

    Get all messages in the current user's inbox, including private messages, comment replies, and post replies. Requires the privatemessages scope.

    Inputs

    afterstring
    Fullname of the last message for pagination
    countinteger
    Number of items already seen for accurate pagination
    limitinteger
    Maximum number of messages to return (default 25, max 100)
    markboolean
    If true, mark all returned messages as read

    Also accepts schema_version and tool_version to pin a version.

  • reddit_info_getGet information about one or more Reddit things (posts, comments, subreddits) by their fullnames (e.g.Read-only

    Get Info by Fullname or URL

    Get information about one or more Reddit things (posts, comments, subreddits) by their fullnames (e.g. t3_abc123) or by URL. Requires the read scope.

    Inputs

    idstring
    Comma-separated list of fullnames (e.g. t3_abc123,t1_def456). Use either id or url.
    urlstring
    URL of a Reddit post to look up. Use either url or id.

    Also accepts schema_version and tool_version to pin a version.

  • reddit_live_happening_nowGet the currently featured live thread on Reddit, if one is active.Read-only

    Get Happening Now Live Thread

    Get the currently featured live thread on Reddit, if one is active. Requires read scope.

    Inputs

    This tool takes no inputs.

    Also accepts schema_version and tool_version to pin a version.

  • reddit_live_thread_getGet details about a live thread including title, description, state, and viewer count.Read-only

    Get Live Thread

    Get details about a live thread including title, description, state, and viewer count. Requires read scope.

    Inputs

    threadstringrequired
    ID of the live thread

    Also accepts schema_version and tool_version to pin a version.

  • reddit_live_updates_getGet a listing of updates posted to a live thread.Read-only

    Get Live Thread Updates

    Get a listing of updates posted to a live thread. Requires read scope.

    Inputs

    threadstringrequired
    ID of the live thread
    afterstring
    Fullname of the last update for pagination
    limitinteger
    Maximum number of updates to return (default 25, max 100)

    Also accepts schema_version and tool_version to pin a version.

  • reddit_me_friends_getGet the list of users the current Reddit user has added as friends.Read-only

    Get Friends List

    Get the list of users the current Reddit user has added as friends. Returns friend username, ID, and date added. This is a flat list, not paginated. Requires the read scope.

    Inputs

    This tool takes no inputs.

    Also accepts schema_version and tool_version to pin a version.