快工助手跨境电商知识与商机助手

Creator authorization guide

TikTok Shop 官方资料 · TikTok Shop Partner Center 开发者文档 · 适合开发者

stable本次发布有变化全部展示

来自 TikTok Shop 官方资料快照 ·

打开官方原文 ↗
  1. 当前资料结构化阅读页
  2. 固定快照已留存,可追溯
  3. 官方原文可核对
查看技术与溯源信息
平台 / profile
TikTok Shop / profile.tiktok.docs_api
语言
en-US
发布版本
cn-20260909-2
标签
zhuge/sourceplatform/tiktok_shopaudience/developercategory/api_doctopic/compliancetopic/developer

资料正文

§1 Creator authorization guide

#

§2 This guide is intended for

This guide is intended for

  • apps that need to call Affiliate Creator APIs
  • integrations that need creator-side affiliate data or capabilities
#

§3 What does creator authorization do?

What does creator authorization do?

After creator authorization, the app can call Affiliate Creator APIs.

#

§4 Core concept

Core concept

Creator authorization means:a creator grants your TikTok Shop app access to creator-side data and capabilities, so that your app can call the relevant Creator Open APIs. At its core, the flow is still OAuth-based:

  1. Build an authorization link
  2. Let the user log in and approve authorization
  3. Receive a callback with code
  4. Exchange the code for tokens
  5. Use the token to call Creator APIs

Creator authorization is different from Seller authorization. A creator token and a seller token are different credentials and must not be reused interchangeably.

#

§5 Prerequisites

Prerequisites

Before starting Creator authorization, make sure the following are ready:

#

§6 App-side prerequisites

App-side prerequisites

  • the app is created
  • API access is enabled
  • a valid Redirect URL is configured
  • the required creator scopes are enabled or approved
  • if the creator capability is still beta / allowlist based, the app is approved for that rollout
#

§7 Creator-side prerequisites

Creator-side prerequisites

the user is a real TikTok Shop creator, not just a regular TikTok account. The creator can enroll as a TikTok Shop creator by following the guides for the respective countries:

The creator's selection region must be one of the app's target markets:

Image

If your app is in development, please contact your App Store Manager for a Creator testing account. Creator test accounts are only available to members of our beta phase today.

#

§8 End-to-end authorization flow

End-to-end authorization flow

A practical Creator authorization flow can be understood in 7 steps:

  1. prepare the app
  2. enable creator scopes
  3. build the creator authorization link
  4. let the creator sign in and authorize
  5. receive code and state on the Redirect URL
  6. exchange the auth_code for access_token / refresh_token
  7. call Creator Open APIs and validate granted_scopes
#

§9 Step 1: Prepare the app

Step 1: Prepare the app

In Partner Center, make sure you have:

  • created the app / service
  • enabled API access
  • configured the Redirect URL
  • obtained app_key / app_secret
  • enabled the required creator scopes in Manage API

The Redirect URL is the callback destination after successful authorization. In production, it should be a real server-side endpoint that can validate the callback parameters, especially state.

#

§10 Step 2: Enable creator scopes

Step 2: Enable creator scopes

These are the creator scopes enabled or approved in Partner Center. Go to APP & Service -> Manage API, then look for scope keys prefixed with creator (for example, creator.xxx). The available creator scope keys are listed on this page:

Image

#

§12 Step 4: Let the creator sign in and authorize

Step 4: Let the creator sign in and authorize

After opening the authorization link, the creator typically:

  1. signs in with the TikTok account
  2. enters the creator authorization page
  3. reviews the requested scopes
  4. if the authorization page supports partial authorization, the creator may toggle some scopes on or off
  5. clicks Authorize
#

§13 A creator may authorize only part of the requested scopes

A creator may authorize only part of the requested scopes

This means authorization success does not automatically mean all required business scopes were granted.

#

§14 Step 5: Handle the callback and retrieve the auth code

Step 5: Handle the callback and retrieve the auth code

After the creator approves authorization, the platform redirects back to your Redirect URL with a temporary code. Here code is the parameter name returned in the callback URL; when you call Get Access Token, pass that same value as auth_code. A typical callback looks like this: PLAIN Word Wrap

{redirect_url}?code={CODE_FROM_CALLBACK}&state={state}
#

§16 Step 6: Exchange the auth code for tokens

Step 6: Exchange the auth code for tokens

Use the Get Access Token endpoint: PLAIN Word Wrap

GET https://auth.tiktok-shops.com/api/v2/token/get
#

§17 Required parameters

Required parameters

  • app_key
  • app_secret
  • auth_code (use the code returned by the callback URL)
  • grant_type=authorized_code
#

§18 Key response fields

Key response fields

  • access_token
  • refresh_token
  • open_id
  • user_type
  • granted_scopes
#

§19 Validate immediately after token exchange

Validate immediately after token exchange

Always verify:

  1. code == 0
  2. user_type == 1 (a value of 1 indicates a creator identity)
  3. granted_scopes covers the minimum scopes required by your business

If these checks fail, do not move directly into business API calls.

#

§20 Step 7: Refresh the token

Step 7: Refresh the token

When the access token expires, refresh it with: PLAIN Word Wrap

GET https://auth.tiktok-shops.com/api/v2/token/refresh
#

§21 Required parameters

Required parameters

  • app_key
  • app_secret
  • refresh_token
  • grant_type=refresh_token
#

§22 After refreshing, re-check key fields

After refreshing, re-check key fields

  • user_type
  • open_id
  • granted_scopes

For safety, it is better not to assume the refreshed token behaves identically to the previous token. A safer engineering practice is to revalidate key fields whenever a new token is issued.

#

§23 How to use granted_scopes properly

How to use granted_scopes properly

granted_scopes is one of the most important fields in Creator authorization. Use it at two levels:

#

§24 Level 1: right after authorization

Level 1: right after authorization

Check whether the creator granted the minimum scopes your business requires.

#

§25 Level 2: before feature execution

Level 2: before feature execution

Before calling an endpoint, confirm that the required scope is included in granted_scopes.

#

§27 Partial authorization

Partial authorization

Creators can opt in or out what scope to authorize. A creator may not approve all scopes in one pass; callback success does not by itself mean all business-required scopes are available. Image After calling [Get Access Token], please check the granted_scopes array in the response, and make sure the creator has authorized all necessary scopes. The scope keys definition is on the Manage API page: Image If the authorized scopes are not sufficient for your business, please ask the creator to "remove all access" and re-authorize again.

#

§28 Reauthorization and deauthorization

Reauthorization and deauthorization

Creator authorization can change through the two lifecycle events below.

#

§29 The creator removes all access

The creator removes all access

Result:

  • the old token becomes invalid
  • future API calls fail with token invalid / deauthorized style errors
#

§30 The creator disables some scopes

The creator disables some scopes

Result:

  • APIs under those scopes will start failing with permission errors
  • a common error is 105005
#

§32 Common errors and troubleshooting

Common errors and troubleshooting

Error / scenarioMeaningSuggested action
105005Missing required scope at app level or token levelCheck app scopes, then check the token's granted_scopes, then ask the creator to reauthorize if needed
105002Access token expiredRefresh the token
105001 / token invalidToken invalid, revoked, or user removed all accessReauthorize if needed
101000Wrong token identity or wrong API-token pairingMake sure you are not using a seller token against a creator API
A practical rule of thumb:If a newly enabled scope still does not work, the first thing to inspect is usually the token's granted_scopes from the creator's latest authorization, not the app version number.
#

§33 Best practices

Best practices

  1. generate and validate state on the server side
  2. persist granted_scopes
  3. store creator tokens separately from seller tokens
  4. exchange the auth code as soon as possible after callback
  5. request only the minimum necessary scopes
  6. provide a clear reauthorization entry in the product
  7. check scope capability before calling an API
#

§34 FAQ

FAQ

#

§35 Can a creator token and a seller token be reused interchangeably?

Can a creator token and a seller token be reused interchangeably?

No. They represent different user identities and should not be mixed.

#

§36 Why did authorization succeed but the API still returns `105005`?

Why did authorization succeed but the API still returns 105005?

Usually because either:

  • the app does not have the required scope enabled, or
  • the token's granted_scopes does not contain the required scope
#

§37 After refreshing a token, is it recommended to keep checking `granted_scopes`?

After refreshing a token, is it recommended to keep checking granted_scopes?

For safety, yes. A safer engineering practice is to revalidate key capability fields whenever a new token is issued.

#

§38 What should I do if the creator granted only part of the requested scopes?

What should I do if the creator granted only part of the requested scopes?

Use granted_scopes to control feature availability, and reauthorize if a missing scope blocks critical business flows.

#

§39 Missing parameter: The URL must include the "state" parameter for creators to authorize this app. Please contact the developer for assistance.

Missing parameter: The URL must include the "state" parameter for creators to authorize this app. Please contact the developer for assistance.

For creator authorization links, you are required to manually add a state parameter for extra security. The state is an unguessable random string that can help protect cross-site request forgery attacks, and is not automatically included in the basic authorization link.

#

§40 No data retrieved: The requested API list is empty. Please contact the app developer for more information.

No data retrieved: The requested API list is empty. Please contact the app developer for more information.

APP must open creator api scopes. APP & Service -> Manage API, look for scope keys that begin with creator.

#