Get a Mini Drama Playback Token
Retrieves a temporary playback token for an episode. Mini Drama Player requires this token only in TikTok versions earlier than 44.5.0. Later versions retrieve playback information automatically.
Note: To check whether you need a token, call TTMinis.canIUse('getDramaInfo'). If it returns false, get a token. To avoid supporting earlier versions, set your mini app's minimum supported library version to 0.5 or later (TikTok 44.9.0 on iOS and Android).
Endpoint
HTTP URL |
|
HTTP method |
|
Scopes |
|
Request
Headers
Field | Type | Description | Required | Example |
|
| The client access token of your mini app, prefixed with | Yes |
|
Query parameters
Field | Type | Description | Required | Example |
|
| The client key of your mini app. | Yes |
|
|
| The ID of the episode. | Yes |
|
Request example
curl --location --request GET 'https://open.tiktokapis.com/v2/sg/shortdrama/play_token/?client_key=CLIENT_KEY&episode_id=7300000000000000002' \
--header 'Authorization: Bearer CLIENT_ACCESS_TOKEN'Replace the following:
CLIENT_KEY: your mini app's client key.CLIENT_ACCESS_TOKEN: your mini app's client access token.
Response
Response body
Field | Type | Description |
| The playback token. | |
| The error object. |
PlayTokenData
Field | Type | Description | Example |
|
| The temporary playback token. Pass it in |
|
ErrorStruct
Field | Type | Description |
|
| The error code. Omitted on success. |
|
| A human-readable description of the error. |
|
| The unique identifier for the request. Include this value when contacting support. |
Response example
{
"data": {
"play_auth_token": "example0000playauthtoken"
},
"error": {
"log_id": "202508010000000000000000000000000"
}
}