Everything an AI agent can do with the TikTok API.

A reference guide for building AI agents: every method, how to authenticate, and the permissions each one needs.

Endpoints11
API versionv2
Last updated23 June 2026
Orientation

How the TikTok API works.

The TikTok API is how an app or AI agent works with a creator's TikTok account: reading their profile and follower stats, listing the videos they have posted, and publishing new videos or photos to their profile. Access is granted through OAuth 2.0, where the creator signs in and approves a set of scopes, and the resulting token reaches only what those scopes allow and only that creator's own account. The scopes that post content go through a TikTok review first, and TikTok can push events to a callback URL when a connection or a post changes.

11Endpoints
5Capability groups
6Read
5Write
5Permissions
Authentication
TikTok authenticates with OAuth 2.0 through Login Kit. A creator signs in on TikTok's authorization page and grants scopes, which the app exchanges for a user access token sent as 'Authorization: Bearer '. The token reaches only the scopes the user agreed to, and a refresh token mints a new access token through the same token endpoint. The separate Research API uses a client access token instead of a user token.
Permissions
Access is scope-based. user.info.basic reads the core profile, user.info.profile adds bio and verification, and user.info.stats adds follower and like counts. video.list reads the creator's own videos. video.publish posts directly to a profile, while video.upload stages a draft the creator finishes inside TikTok. Scopes are toggleable, so a user can grant one and deny another. The posting scopes only work in full once the app passes TikTok's content audit; before that, posts are forced to private.
Versioning
The current platform lives under a single v2 namespace, which replaced the retired v1 API. There is no per-request version header to pin and no dated version string; TikTok ships additive changes, new fields, and new endpoints through its changelog. An integration calls the v2 paths directly and tracks the changelog for changes.
Data model
The API is JSON over HTTPS at open.tiktokapis.com, scoped to the connected creator's own account. Reads cover the creator's profile and their own videos; the video list and query return only videos that creator owns. Content posting is a two-step flow: an init call returns a publish_id, then the media is transferred and the post status is polled or delivered by webhook. Public-data reads, like comments, live in the separate, vetted Research API.
Connect & authenticate

Connection & authentication methods.

How an app or AI agent connects to TikTok determines what it can reach. Access runs through a user access token from the OAuth 2.0 login flow, and the token carries only the scopes the user agreed to.

Ways to connect

REST API (v2)

The v2 API answers at https://open.tiktokapis.com. A call carries a user access token in the Authorization header as a Bearer token, and the scopes on that token decide which methods it can reach. It covers user info, the creator's own videos, and content posting.

Best forConnecting an app or AI agent to a creator's TikTok account.
Governed byThe user access token and the scopes it carries.
Docs ↗

Webhooks

TikTok POSTs JSON events to a callback URL set in the developer portal, like authorization.removed when a user disconnects or video.publish.completed when a post finishes. Delivery is at-least-once, so the same event can arrive more than once, and the receiver returns 200 to acknowledge.

Best forReceiving TikTok events at an app or AI agent without polling.
Governed byThe callback URL registered for the app.
Docs ↗

Research API

A separate, vetted track at https://open.tiktokapis.com for querying public TikTok data, including public videos and comments. It authenticates with a client access token and is open only to approved academic researchers in eligible regions.

Best forApproved researchers querying public TikTok data.
Governed byThe client access token and the research.data scopes granted after review.
Docs ↗
Authentication

OAuth 2.0 (Login Kit)

A user signs in through TikTok's authorization page and grants a set of scopes, which the app exchanges for a user access token. The token reaches only what those scopes allow, and toggleable scopes let a user deny one while granting another. The token is refreshed through the same token endpoint.

TokenUser access token (Bearer), with a refresh token
Best forActing on behalf of a creator who has authorized the app.
Docs ↗

Client access token (Research API)

The Research API uses a client access token, obtained from the token endpoint with the app's client_key and client_secret, rather than a user token. It reaches only public data and only the research.data scopes granted to an approved research application.

TokenClient access token (Bearer)
Best forApproved research applications querying public data.
Docs ↗
Endpoint reference

Every TikTok API method.

Filter by method, access, or permission, or search any path. Select a row for version detail, rate limits, the related webhook event, and the source.

MethodEndpointWhat it doesAccessPermissionVersion

Authorization

Exchange an authorization code for a user access token, refresh it, and revoke a connection.2

Authenticated with the app's client_key and client_secret, not a user scope. The same endpoint mints a fresh access token from a refresh token. Sent as application/x-www-form-urlencoded.

Acts onaccess token
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Authenticated with the app's client_key and client_secret. Revoking fires the authorization.removed webhook event.

Acts onaccess token
Permission (capability)None required
VersionAvailable since the API’s base version
Webhook eventauthorization-removed
Rate limitStandard limits apply

User info

Read a creator's profile fields and statistics for the connected account.1

user.info.basic returns open_id, union_id, avatar, and display_name. The profile_deep_link, bio_description, is_verified, and username fields additionally need user.info.profile. The follower_count, following_count, likes_count, and video_count fields additionally need user.info.stats.

Acts onuser
Permission (capability)user.info.basic
VersionAvailable since the API’s base version
Webhook eventNone
Rate limit600 requests per minute per access token

Videos

List the connected creator's own videos and query specific videos by id.2

Returns only the connected creator's own videos, not other accounts. Paged with a cursor and a has_more flag, up to 20 videos per page.

Acts onvideo
Permission (capability)video.list
VersionAvailable since the API’s base version
Webhook eventNone
Rate limit600 requests per minute per access token

Up to 20 video ids per request, and only videos owned by the connected creator are returned.

Acts onvideo
Permission (capability)video.list
VersionAvailable since the API’s base version
Webhook eventNone
Rate limit600 requests per minute per access token

Content posting

Query creator settings, then directly post or upload videos and photos to the creator's account.5

Required before a direct post, so the app can render the privacy and interaction options TikTok mandates on the posting screen. Also accepted with video.upload for the upload flow.

Acts oncreator info
Permission (capability)video.publish
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Accepts the video by direct file upload or by a pre-verified pull-from-URL. Returns a publish_id to track. Until the app passes TikTok's content audit, posts are forced to private viewing only.

Acts onvideo post
Permission (capability)video.publish
VersionAvailable since the API’s base version
Webhook eventvideo-publish-completed
Rate limit6 requests per minute per access token

The creator finishes and publishes inside TikTok, rather than the app posting directly. Returns a publish_id and an upload_url valid for one hour.

Acts onvideo upload
Permission (capability)video.upload
VersionAvailable since the API’s base version
Webhook eventvideo-upload-failed
Rate limitStandard limits apply

The post_mode field selects DIRECT_POST, which needs video.publish, or MEDIA_UPLOAD, which needs video.upload. Photo URLs must be publicly accessible. Title is capped at 90 characters and description at 4,000.

Acts onphoto post
Permission (capability)video.publish
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Reports whether a post is processing, published, or failed. Accepted with video.publish or video.upload, matching the scope that started the post.

Acts onpost status
Permission (capability)video.publish
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Research

Query public comments and other public data through the vetted Research API.1

Part of the Research API, not the consumer Login Kit. Access is limited to approved academic researchers in eligible regions, and uses a client access token rather than a user token. There is no general comment.list scope for posting or moderating comments.

Acts oncomment
Permission (capability)research.data.basic
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply
No endpoints match those filters.
Webhooks

Webhook events.

TikTok can notify an app or AI agent when something happens to a connection, like a user removing authorization or a video finishing publishing. It posts a JSON event to a callback URL registered for the app, so an integration learns about activity without polling.

EventWhat it signalsTriggered by
authorization.removedFires when a user deauthorizes the app, whether by their own action, account deletion, an age change, an account ban, or the developer revoking access. A reason code says which./v2/oauth/revoke/
video.publish.completedFires when a video posted through the Content Posting API has finished publishing on the creator's profile./v2/post/publish/video/init/
video.upload.failedFires when a video sent through the Content Posting API fails to process on the platform./v2/post/publish/inbox/video/init/
portability.download.readyFires when data requested through the Data Portability API has finished preparing and is ready to download.In-app only
No events match that search.
Rate limits & pagination

Rate limits, pagination & request size.

TikTok limits how fast an app or AI agent can call, through a per-method request quota measured over a sliding window, with separate per-user ceilings on the posting endpoints.

Request rate

TikTok meters each method against its own quota over a one-minute sliding window per user access token. The read endpoints for user info, the video list, and the video query allow about 600 requests per minute each. The direct-post initialization for content posting is far tighter, at about 6 requests per minute per token. Going over returns HTTP 429 with the error code rate_limit_exceeded. An app that needs higher limits can ask TikTok to review and raise them.

Pagination

List endpoints are cursor-based. A response carries a cursor and a has_more flag, and the cursor is passed to the next request to fetch the following page. The video list returns up to 20 videos per page, set through max_count with a default of 10, and the video query takes up to 20 video ids in one request.

Request size

A photo post accepts up to 35 images, a title up to 90 characters, and a description up to 4,000 characters. An upload_url returned for a video upload is valid for one hour. Media must meet TikTok's format, resolution, and size requirements, and a pull-from-URL source must be publicly reachable.

Errors

Status codes & error handling.

The status codes an agent should handle, and what to do about each.

StatusCodeMeaningWhat to do
400invalid_paramsOne or more fields in the request is invalid.Correct the named fields against the method's reference and resend.
400scope_permission_missedThe access token is missing a scope that some requested fields need, such as asking for stats fields without user.info.stats.Request the missing scope in the authorization flow, or drop the fields that need it.
400invalid_file_uploadThe uploaded file does not meet the format, size, or chunking specification.Check the file against the media requirements for the endpoint and re-upload.
401access_token_invalidThe access token is invalid, expired, or not found in the request.Refresh the token through the token endpoint and retry, or re-run the authorization flow.
401scope_not_authorizedThe user did not authorize the scope this request needs, often because the app has not passed review for that scope.Add the scope to the authorization request, and complete app review where the scope requires it.
429rate_limit_exceededThe request exceeded the rate limit for the method.Back off and retry after the window, and smooth the request rate.
500internal_errorA generic error on TikTok's side.Retry with backoff, and quote the log_id to TikTok support if it persists.
Versioning & freshness

Version history.

TikTok groups its current developer platform under a single v2 namespace, replacing the retired v1 API, and ships dated changes through its changelog rather than minting new version numbers.

Version history

What changed, and when

Latest versionv2
v2Current version
Current platform (v2 namespace)

The v2 namespace is the current TikTok developer platform, served at open.tiktokapis.com, and it replaced the retired v1 API. It uses OAuth 2.0 through Login Kit for user access tokens and covers Login Kit, Display API methods for user info and the creator's own videos, the Content Posting API, and a separate Research API. There is no per-request version header; changes ship additively through the changelog.

What changed
  • Login Kit, Display API, and Content Posting API consolidated under the v2 namespace at open.tiktokapis.com.
  • Content Posting API added direct posting of videos, inbox uploads, and photo posting of up to 35 images.
  • Scopes split user reads into user.info.basic, user.info.profile, and user.info.stats.
v1 (retired)
Legacy v1 API

The original v1 API and its older authorization page have been retired in favor of v2. Integrations on the v1 endpoints and the deprecated www.tiktok.com/auth/authorize/ flow were directed to migrate to the v2 namespace and the www.tiktok.com/v2/auth/authorize/ flow.

What changed
  • v1 endpoints retired and superseded by the v2 namespace.
  • Deprecated authorization URL replaced by the v2 authorization page.

An integration calls the v2 endpoints directly; there is no per-request version header to pin.

TikTok API changelog ↗
Questions

TikTok API, answered.

What scopes does the TikTok API use, and how do I get them?+
Access is granted by scope through the OAuth login. The common ones are user.info.basic, user.info.profile, and user.info.stats for profile and audience data, video.list for the creator's own videos, and video.publish or video.upload for posting. A user can toggle individual scopes on or off during authorization, so an app should handle a token that has fewer scopes than it asked for. The posting scopes also require the app to pass TikTok's review before they work outside private mode.
Why are my posted videos stuck in private viewing only?+
Until an app passes TikTok's content posting audit, everything it posts is restricted to private viewing. This is a deliberate gate on the video.publish and video.upload scopes, not a bug. The fix is to submit the app for the content posting review in the developer portal; once it passes, posts can use the public and other privacy levels the creator allows.
How does TikTok signal errors?+
Every v2 response carries an error object with a code, a message, and a log_id. On success the code is 'ok'. On failure the code names the problem, such as invalid_params, access_token_invalid, scope_not_authorized, scope_permission_missed, or rate_limit_exceeded, alongside an HTTP status. The log_id is a unique id for the request, and quoting it helps TikTok support trace a problem.
What are the rate limits?+
Each method has its own quota over a one-minute sliding window per access token. The user info, video list, and video query reads allow roughly 600 requests per minute each, while direct-post content posting is held to about 6 requests per minute per token. Exceeding a limit returns HTTP 429 with the code rate_limit_exceeded. An app that needs more can ask TikTok to review and raise its limits.
Can an agent read or post comments?+
Not through the consumer API. There is no general scope to read, post, or moderate comments on a creator's behalf. Comments are available only through the Research API endpoint for public comments, which is limited to approved academic researchers in eligible regions and uses a client access token, not a user token.
How do I receive events instead of polling?+
TikTok webhooks POST a JSON event to a callback URL set in the developer portal. Events include authorization.removed when a user disconnects, video.publish.completed when a post finishes, and video.upload.failed when an upload fails. Delivery is at-least-once, so the same event can arrive more than once and the receiver should be idempotent, and the endpoint returns HTTP 200 to acknowledge each delivery.
What is the difference between video.publish and video.upload?+
video.publish directly posts content to the creator's profile from the app, so the app controls the caption and privacy settings, subject to TikTok's required posting screen. video.upload instead sends the content to the creator's TikTok inbox as a draft, which the creator then finishes and posts inside the TikTok app. Both go through TikTok's content audit before they work outside private mode.
Related

More social API guides for agents

What is Bollard AI?

Control what every AI agent can do in TikTok.

Bollard AI sits between a team's AI agents and TikTok. Grant each agent exactly the access it needs, read or write, scope by scope, and every call is checked and logged.

  • Set read, write, or full access per agent, never a shared TikTok token.
  • Denied by default, so an agent reaches only what has been explicitly allowed.
  • Every call recorded in plain English: who, what, where, and the decision.
TikTok
Social Agent
Read profile and stats ResourceOffReadFull use
List own videos ResourceOffReadFull use
Post to profile ActionOffReadFull use
Per-agent access, set in Bollard AI, not in TikTok