来自 TikTok Shop 官方资料快照 ·
- 当前资料结构化阅读页
- 固定快照已留存,可追溯
- 官方原文可核对
资料正文
§3 Requirements
- If the app is still in development, the app can only accept authorization from the owner of the app. After launch, the app can accept authorization from other partners.
- The app must enable partner API scopes, which are the ones starting with
partnerin scope keys:
Image
§5 Get and refresh tokens
After the partner approves authorization, TikTok Shop redirects the partner back to the app's configured redirect URL with an authorization code. Exchange this code for an access token before calling Affiliate Partner APIs.
- Receive the authorization code from the redirect URL.
- Call the token API from your backend service:
GET https://auth.tiktok-shops.com/api/v2/token/get?app_key={app_key}&app_secret={app_secret}&auth_code={auth_code}&grant_type=authorized_code
The successful response includes access_token, access_token_expire_in, refresh_token, refresh_token_expire_in, and granted_scopes. Store tokens securely on the server side. Do not expose app_secret, access_token, or refresh_token in frontend code.
Use the access_token in the x-tts-access-token request header when calling Affiliate Partner APIs. Before calling partner-category APIs, call Get Authorized Category Assets to confirm the authorized business category and obtain the category asset cipher:
GET /authorization/202405/category_assets
Header: x-tts-access-token: {access_token}
The returned category_assets[].cipher identifies the authorized partner category asset and is used as an input parameter in Affiliate Partner APIs.
When the access token expires, refresh it with the refresh token:
GET https://auth.tiktok-shops.com/api/v2/token/refresh?app_key={app_key}&app_secret={app_secret}&refresh_token={refresh_token}&grant_type=refresh_token
If the refresh token expires or the partner cancels authorization, ask the partner to authorize the app again.
§6 Partner requirements
Partner authorization grants access only to the business category data that the partner authorizes and the app is approved to access. Currently, Partner Center exposes partner authorization only for the Seller and Scalable Creator Match-Up (TAP) category; it does not grant access to unrelated partner business data. The partner must have successfully enrolled in Seller and Scalable Creator Match-Up (TAP): Image Make sure the user chooses Seller and Scalable Creator Match-Up (TAP) on the authorization page. Image
