TikTok for Developers · Arazzo Workflow

TikTok OAuth Login and Profile Bootstrap

Version 1.0.0

Exchange an authorization code for an access token, then immediately read the authenticated user's profile.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub AdvertisingAnalyticsAuthenticationContentSocial-MediaVideoArazzoWorkflows

Provider

tiktok-for-developers

Workflows

oauth-login-and-profile
Exchange an authorization code for tokens and read the user's profile.
Exchanges the OAuth authorization code for access and refresh tokens, then reads the authenticated user's profile using the new access token.
2 steps inputs: clientKey, clientSecret, code, redirectUri, userFields outputs: accessToken, displayName, openId, refreshToken
1
exchangeCode
Exchange the authorization code for an access token and refresh token via the OAuth token endpoint.
2
getProfile
Read the authenticated user's profile using the freshly issued access token.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: TikTok OAuth Login and Profile Bootstrap
  summary: Exchange an authorization code for an access token, then immediately read the authenticated user's profile.
  description: >-
    Completes the TikTok OAuth handshake and bootstraps a user session. The
    workflow exchanges the authorization code returned from the Login Kit
    redirect for an access token and refresh token, then uses the freshly
    issued access token to read the authenticated user's profile from the
    Display API. Every step spells out its request inline, including the inline
    Bearer authorization on the profile call, so the flow can be read and
    executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: oauthApi
  url: ../openapi/tiktok-for-developers-oauth-api-openapi.yml
  type: openapi
- name: userApi
  url: ../openapi/tiktok-for-developers-user-api-openapi.yml
  type: openapi
workflows:
- workflowId: oauth-login-and-profile
  summary: Exchange an authorization code for tokens and read the user's profile.
  description: >-
    Exchanges the OAuth authorization code for access and refresh tokens, then
    reads the authenticated user's profile using the new access token.
  inputs:
    type: object
    required:
    - clientKey
    - clientSecret
    - code
    - redirectUri
    properties:
      clientKey:
        type: string
        description: Your app's client key.
      clientSecret:
        type: string
        description: Your app's client secret.
      code:
        type: string
        description: Authorization code from the OAuth redirect.
      redirectUri:
        type: string
        description: Redirect URI registered for your app.
      userFields:
        type: string
        description: Comma-separated user fields to return.
        default: open_id,union_id,avatar_url,display_name,is_verified,follower_count,video_count
  steps:
  - stepId: exchangeCode
    description: >-
      Exchange the authorization code for an access token and refresh token via
      the OAuth token endpoint.
    operationId: exchangeToken
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        client_key: $inputs.clientKey
        client_secret: $inputs.clientSecret
        code: $inputs.code
        grant_type: authorization_code
        redirect_uri: $inputs.redirectUri
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      accessToken: $response.body#/access_token
      refreshToken: $response.body#/refresh_token
      openId: $response.body#/open_id
      scope: $response.body#/scope
      expiresIn: $response.body#/expires_in
  - stepId: getProfile
    description: >-
      Read the authenticated user's profile using the freshly issued access
      token.
    operationId: getUserInfo
    parameters:
    - name: Authorization
      in: header
      value: Bearer $steps.exchangeCode.outputs.accessToken
    - name: fields
      in: query
      value: $inputs.userFields
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      displayName: $response.body#/data/user/display_name
      avatarUrl: $response.body#/data/user/avatar_url
      followerCount: $response.body#/data/user/follower_count
  outputs:
    accessToken: $steps.exchangeCode.outputs.accessToken
    refreshToken: $steps.exchangeCode.outputs.refreshToken
    openId: $steps.exchangeCode.outputs.openId
    displayName: $steps.getProfile.outputs.displayName

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/tiktok-for-developers-oauth-login-and-profile-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.