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

Call Get Authorized Shops

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 Call Get Authorized Shops

After you have generated an access_token and created the cryptographic hash for your request, you can make your first TikTok Shop API call: Get Authorized Shops. For this call, pass the access_token in the x-tts-access-token header and include the signed query parameters in the request URL. A command-line tool such as cURL is recommended because this request requires custom headers.

#

§2 Domain usage

This getting-started flow uses several TikTok Shop domains. They serve different purposes:

DomainPurpose
https://partner.tiktokshop.comTikTok Shop Partner Center and developer documentation entry point.
https://partner-sso.tiktok.com/account/loginPartner Center Console sign-in page. After signing in, use the Console to manage apps, development shops, and app credentials.
https://auth.tiktok-shops.comTikTok Shop Authorization Server for token APIs, including /api/v2/token/get and /api/v2/token/refresh.
https://open-api.tiktokglobalshop.comTikTok Shop Open API resource server. Use this domain to call APIs such as GET /authorization/202309/shops.
#

§3 App credential location

You can find your app credentials in the Partner Center Console:

Partner Center Console
  -> App & Service
  -> Select your app
  -> App credentials / Developing section
  -> App Key and App Secret

Some app creation guides mention that App Key and App Secret are shown on the confirmation page when the app is created. If you need to look them up later, use the Partner Center Console path above.

#

§4 Request parameters

ParameterLocationTypeDescription
app_keyQuerystringThe App Key generated for your TikTok Shop App.
signQuerystringThe cryptographic hash that you created in Create a hash to sign your test API call.
timestampQueryUnix timestampThe Unix epoch timestamp used to generate the sign parameter. The timestamp used for the signature and the timestamp sent in this API call must match the same signing attempt and must be within five minutes of the request time. If more than five minutes have passed, generate a new timestamp and a new sign value together.
x-tts-access-tokenHeaderstringThe test access token you created when you generated a test access token.
#

§5 Example request

If you're not creating the request programmatically in code using an HTTP library, you can use cURL:

curl --location --request GET 'https://open-api.tiktokglobalshop.com/authorization/202309/shops?app_key=<your_app_key>&sign=<your_cryptographic_hash>&timestamp=<timestamp_used_for_this_sign>' \
  --header 'Content-Type: application/json' \
  --header 'x-tts-access-token: <your_access_token>'
#

§6 Example successful response

If your request is successful, you'll receive a response like this:

{
  "code": 0,
  "data": {
    "shops": [
      {
        "cipher": "<the shop cipher for your test TikTok Shop>",
        "code": "<the shop code for your test TikTok Shop>",
        "id": "<the identifier for your test TikTok Shop>",
        "name": "<the name of your test TikTok Shop>",
        "region": "<the region of your test TikTok Shop>",
        "seller_type": "<your seller type>"
      }
    ]
  },
  "message": "Success",
  "request_id": "<the request identifier generated by the TikTok Shop server>"
}
#

§7 `seller_type` and `user_type`

seller_type and user_type

The seller_type field in this API response is not the same as the user_type field returned by the token API.

FieldReturned byMeaning
user_typeToken APIs such as https://auth.tiktok-shops.com/api/v2/token/getThe type of user or authorization principal that generated the token, such as seller, creator, partner, or global-selling related types.
seller_typeGET /authorization/202309/shopsThe type of seller/shop returned in the authorized shop list. Possible values include LOCAL and CROSS_BORDER.

Use seller_type to understand the shop model returned by Get Authorized Shops. Use user_type only when interpreting the token response from Generate a test access token.

#

§8 Troubleshooting

The three most common issues are related to the access_token, the sign value, or an expired timestamp/signature pair. If your request fails due to an authentication issue, check the x-tts-access-token header and ensure that you've followed all the steps in Generate a test access token. If you still encounter authentication issues, you may have a problem with either your TikTok Shop App or your test TikTok Shop Seller account. You can reach out to technical support for help. If your request fails because of an invalid sign parameter, review Sign your API request, which contains the complete signing rules. Make sure the API path, sorted query parameters, request body if any, and App Secret are exactly the same values used to create the signature. If your request fails because the timestamp or signature has expired, generate a fresh Unix timestamp and recreate the sign value with that same timestamp. Do not reuse an old signature with a new timestamp, and do not reuse a new signature with an old timestamp. Also check your local machine's clock if you continue to see timestamp-related errors. If you still experience issues after checking the access token, signature, and timestamp, reach out to technical support for assistance.

#

§9 Next steps

After you've successfully made your first API call, you're ready to start working on your TikTok Shop App. Head over to the developer guide to learn about:

#