Skip to content

Upload File Init

POST
/open/202512/file/init

Use this API to initialize a file upload session. Then upload the file to the returned upload URL. Files of 5 MiB (5,242,880 bytes) or less must be uploaded as a single, non-chunked request with total_chunk_count set to 1; larger files use a multipart upload. After the upload step returns a ResourceId, pass that ResourceId to the API for the target path.

For more details, see https://partner.tiktokshop.com/docv2/page/wfi3nz36.

shop_cipher
string

Use this property to pass shop information in requesting the API. Failure in passing the correct value when requesting the API for cross-border shops will return incorrect response. Get by API Get Authorization Shop

category_asset_cipher
string

Use this property to pass shop information in requesting the API. Failure in passing the correct value when requesting the API for cross-border shops will return The partner identifier used in API requests. Retrieve this value by using the Get Authorized Category Assets API.

Media typeapplication/json
object
file_name
required

The name of the file to upload for this upload session.

string
file_type
required

The type of file to upload. Currently, only video is supported.

string
file_size
required

File size, bytes

integer format: int64
total_chunk_count
required

The total number of upload chunks. Must be greater than 0. For files of 5 MiB (5,242,880 bytes) or less, set this value to 1.

integer format: int64
target_path
required

After the video is uploaded, use this interface to bind the video resource to the specific material

string
Example
{
"file_name": "video_20251201.mp4",
"file_type": "video",
"file_size": 1024,
"total_chunk_count": 1,
"target_path": "[POST]/affiliate_seller/202501/images/upload"
}

Success

Media typeapplication/json
object
code

Status code; 0 means success.

integer format: int64
message

Success or failure message.

string
request_id

Request log ID.

string
data
object
upload_url

The URL provided by platform where the file can be uploaded.

string
upload_token

The upload token used when uploading the file to the returned upload URL.

string
Example
{
"code": 0,
"data": {
"upload_url": "https://open-api.tiktokglobalshop.com/file/202512/upload",
"upload_token": "50d858e0985ecc7f60418aaf0cc5ab587f42c2570a884095a9e8ccac74c50b88"
},
"message": "Success",
"request_id": "202203070749000101890810281E8C70B7"
}