Upload a Mini Drama Image
Uploads an image from a public URL for use as a mini drama or episode cover. Pass the returned open_pic_id in the cover_list field when you update a mini drama.
Endpoint
HTTP URL |
|
HTTP method |
|
Scopes |
|
Content type |
|
Request
Headers
Field | Type | Description | Required | Example |
|
| The client access token of your mini app, prefixed with | Yes |
|
|
| The media type of the request body. | Yes |
|
Request body
Field | Type | Description | Required | Example |
|
| The URL of the image. The URL must be publicly downloadable. | Yes |
|
Request example
curl --location 'https://open.tiktokapis.com/v2/sg/shortdrama/image' \
--header 'Authorization: Bearer CLIENT_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"image_url": "https://example.com/cover.jpg"
}'Replace CLIENT_ACCESS_TOKEN with your mini app's client access token.
Response
Response body
Field | Type | Description |
| The uploaded image. | |
| The error object. |
ImageData
Field | Type | Description | Example |
|
| The ID of the uploaded image. Pass this value 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": {
"open_pic_id": "b4c45eb643861b84b3b678a2f20e7acd"
},
"error": {
"log_id": "202508010000000000000000000000000"
}
}Error codes
Error code | Description | Resolution |
| The service is temporarily unavailable. | Retry later. If the error persists, contact support with the |
| The image request is invalid. | Check the client key and provide an accessible HTTP or HTTPS |
| A storage object operation failed. | Retry the request. If the error persists, contact support with the |
| TikTok couldn't download the image from the URL. | Verify that the URL is publicly accessible, then retry. |