Skip to main content

v2.media.init_video_upload

POST /api/v2/media/init_video_upload

Use this API to initialize a new video upload task and obtain a unique upload session ID.

Endpoint URL

URL: https://partner.shopeemobile.com/api/v2/media/init_video_upload

Common Request Parameters

NameTypeSampleDescription
partner_idint1Partner ID is assigned upon registration is successful. Required for all requests.
timestamptimestamp1610000000This is to indicate the timestamp of the request. Required for all requests. Expires in 5 minutes.
signstringe318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2Signature generated by partner_id, api path, timestamp and partner_key via HMAC-SHA256 hashing algorithm. More details: https://open.shopee.com/documents?module=87&type=2&id=58&version=2

Request Parameters

NameTypeRequiredSampleDescription
businessint32True3Defines the business type of the uploaded image. Supported values: 3 = Video
sceneint32True1Defines the purpose of the uploaded image under the specified business type. Supported values: - If business = 3 (Video): 1 = Shopee Video
file_namestringTruetest_video_name.mp4Original video file name.
file_sizeint64True26214400Total video file size in bytes. Rules and restrictions by business and scene: - If business = 3 (Video) and scene = 1 (Shopee Video): Maximum 1GB.
durationint32True105Video duration in seconds. Rules and restrictions by business and scene: - If business = 3 (Video) and scene = 1 (Shopee Video): 1s~180s.

Response Parameters

NameTypeSampleDescription
errorstringIndicate error type if hit error. Empty if no error happened.
messagestringIndicate error details if hit error. Empty if no error happened.
warningstringIndicate warning message you should take care.
request_idstringe3e3e7f33ee88a7454c64e7a0b546e01The identifier for an API request for error tracking.
responseobject
video_upload_idstringsg-11110201-6kh48-mepm7a0ttcw3c3Unique upload session ID.
part_sizeint6410485760The size of each part. When uploading video chunks, the video must be split according to this part size for each upload request.