Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Litmus (OAuth)

Scalekit connector
Open markdown

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

Tools
24
What they doRead · write · destructive
13 · 10 · 113 read10 write1 destructive
Users sign in with
OAuth app
Your own Litmus (OAuth) 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 Litmus (OAuth) connection

    In AgentKit > Connections, create a Litmus (OAuth) 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

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

    Then enter the app's Client ID and Client Secret on the Litmus (OAuth) connection.

  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 = 'litmusoauth'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Litmus (OAuth):', 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: 'litmusoauth_guardian_emails_list',
    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
  • litmusoauth_accessibility_check_getGet the results of accessibility checks on an email.Read-only

    Get Accessibility Check Results

    Get the results of accessibility checks on an email. Returns meta.state (pending or complete) and, when complete, the number of checks, the passes and the failures with rule, description, standards (for example WCAG 2AA), impact and the offending HTML snippets. Use litmusoauth_accessibility_check_get to poll after litmusoauth_accessibility_check_create. Polling while pending does not count against the rate limit. Uses the OAuth connection (Litmus v3 API, early access).

    Inputs

    email_guidstringrequired
    GUID returned by litmusoauth_accessibility_check_create. Example: 5c0e3f6a-0b8e-4d0f-9c55-2f1b8a7d9e10.
  • litmusoauth_guardian_email_result_getGet the latest Email Guardian monitoring result for an enrolled email.Read-only

    Get Email Guardian Result

    Get the latest Email Guardian monitoring result for an enrolled email. Returns, per email client, a screenshot URL and change level (major, minor or noChange), per link the destination, screenshot, status (ok or broken) and error, and checked-at. Use litmusoauth_guardian_email_result_get to see whether rendering or links changed. Uses the OAuth connection (Litmus v3 API, early access).

    Inputs

    email_idstringrequired
    ID of the enrolled Email Guardian email, from litmusoauth_guardian_email_enroll or litmusoauth_guardian_emails_list. Example: 11.
  • litmusoauth_guardian_emails_listList every email enrolled in Email Guardian.Read-only

    List Email Guardian Emails

    List every email enrolled in Email Guardian. Returns enrolled emails with their IDs, plus first and last page links. Use litmusoauth_guardian_emails_list for all users. Use litmusoauth_guardian_user_emails_list for one integration user. Uses the OAuth connection (Litmus v3 API, early access).

    Inputs

    page_numberinteger
    Page number, starting at 1. Example: 1.
    page_sizeinteger
    Results per page (default 20). Example: 20.
  • litmusoauth_guardian_user_emails_listList the emails one integration user has enrolled in Email Guardian.Read-only

    List Integration User's Guardian Emails

    List the emails one integration user has enrolled in Email Guardian. Returns that user's enrolled emails with their IDs, plus page links. Use litmusoauth_guardian_user_emails_list for one end user. Use litmusoauth_guardian_emails_list for everyone. Uses the OAuth connection (Litmus v3 API, early access).

    Inputs

    integration_user_idstringrequired
    ID of the integration user (your end user) you act for, from litmusoauth_integration_user_create. Example: 1.
    page_numberinteger
    Page number, starting at 1. Example: 1.
    page_sizeinteger
    Results per page (default 20). Example: 20.
  • litmusoauth_personalize_calendar_event_previewRender a preview of a Litmus Personalize calendar event while you adjust its settings; nothing is published.Read-only

    Preview Calendar Event

    Render a preview of a Litmus Personalize calendar event while you adjust its settings; nothing is published. Returns a button image URL and add-to-calendar links (ics, Google, Outlook, Apple, AOL, Yahoo). Use litmusoauth_personalize_calendar_event_preview while designing. Use litmusoauth_personalize_calendar_event_publish for the version that goes in the email. Uses the OAuth connection (Litmus v3 API, early access).

    Inputs

    attributesobjectrequired
    The calendar event settings, sent as data.attributes. Give templateId, event (title, startDatetime, endDatetime unless allDay, description, location, allDay) and button styling (text, cornerRadius, fontFamily, fontSize, borderWidth, width, height and hex colors background, text, border). Example: {"templateId": "default_calendar_event", "event": {"title": "Tea Time!", "startDatetime": "2030-09-16 15:00:00", "endDatetime": "2030-09-16 16:00:00", "allDay": false}, "button": {"text": "Accept Invite", "cornerRadius": 8}}.
  • litmusoauth_personalize_conditional_image_previewRender a preview of a Litmus Personalize conditional image while you adjust its settings; nothing is published.Read-only

    Preview Conditional Image

    Render a preview of a Litmus Personalize conditional image while you adjust its settings; nothing is published. Returns the preview image URL and click URL. Use litmusoauth_personalize_conditional_image_preview while designing. Use litmusoauth_personalize_conditional_image_publish for the version that goes in the email. Uses the OAuth connection (Litmus v3 API, early access).

    Inputs

    attributesobjectrequired
    The conditional image settings, sent as data.attributes. Give templateId, parameterName (the URL parameter compared against the rules), rules (each with imageUrl, operator such as equals, does not equal, contains, does not contain, empty, is not empty, is in or is not in, value and clickUrl), fallback (imageUrl and clickUrl) and, for previews, mergeTag (the value to preview). Example: {"templateId": "default_conditional_images", "parameterName": "cheese", "rules": [{"imageUrl": "https://example.com/swiss.png", "operator": "equals", "value": "swiss", "clickUrl": "https://example.com/swiss"}], "fallback": {"imageUrl": "https://example.com/default.png", "clickUrl": "https://example.com/"}}.
  • litmusoauth_personalize_progress_bar_previewRender a preview of a Litmus Personalize progress bar while you adjust its settings; nothing is published.Read-only

    Preview Progress Bar

    Render a preview of a Litmus Personalize progress bar while you adjust its settings; nothing is published. Returns a preview image URL. Use litmusoauth_personalize_progress_bar_preview while designing. Use litmusoauth_personalize_progress_bar_publish for the version that goes in the email. Uses the OAuth connection (Litmus v3 API, early access).

    Inputs

    attributesobjectrequired
    The progress bar settings, sent as data.attributes. Give templateId, minimumValue and maximumValue (integers), hex colors (background, progressFill, progressBackground, progressValue, minimumValue, maximumValue) and, for previews, preview.progressValue. Example: {"templateId": "linear_progress_bar", "minimumValue": 0, "maximumValue": 100, "colors": {"background": "#FFFFFF", "progressFill": "#40DC59"}, "preview": {"progressValue": 75}}.
  • litmusoauth_personalize_sentiment_tracker_previewRender a preview of a Litmus Personalize sentiment tracker while you adjust its settings; nothing is published.Read-only

    Preview Sentiment Tracker

    Render a preview of a Litmus Personalize sentiment tracker while you adjust its settings; nothing is published. Returns preview image URLs for each option. Use litmusoauth_personalize_sentiment_tracker_preview while designing. Use litmusoauth_personalize_sentiment_tracker_publish for the version that goes in the email. Uses the OAuth connection (Litmus v3 API, early access).

    Inputs

    attributesobjectrequired
    The sentiment tracker settings, sent as data.attributes. Give templateId, hex colors.resultsValue and, when publishing, url (where voters are redirected). Example: {"templateId": "emoji_sentiment_tracker", "url": "https://example.com/thanks", "colors": {"resultsValue": "#000000"}}.