Chuyển tới nội dung chính

v2.video.post_video

POST /api/v2/video/post_video

You need to call v2.media.init_video_upload, v2.media.upload_video_part, and v2.media.complete_video_upload to upload the video, then call the v2.video.edit_video_info API to set video post information, finally call this API to post the video to Shopee Video.

Đường dẫn Endpoint

URL: https://partner.shopeemobile.com/api/v2/video/post_video

Tham số chung

TênKiểuMẫuMô tả
partner_idint1Partner ID được gán khi đăng ký thành công. Bắt buộc cho tất cả các yêu cầu.
timestamptimestamp1610000000Dùng để chỉ định thời gian của yêu cầu. Bắt buộc cho tất cả các yêu cầu. Hết hạn sau 5 phút.
access_tokenstringc09222e3fc40ffb25fc947f738b1abf1Token truy cập API, dùng để xác định quyền của bạn đối với API. Có thể sử dụng nhiều lần và hết hạn sau 4 giờ.
user_idint1Shopee's mã định danh duy nhất for a user.
signstringe318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2Signature generated by(depends on different APIs) partner_id, api path, timestamp, access_token, user_id and partner_key via HMAC-SHA256 hashing algorithm.

Tham số Request

TênKiểuBắt buộcMẫuMô tả
video_upload_id_liststring[]True["sg-11110199-6v8gq-mgbni6rb44qz04"]ID of uploaded video. Obtain from v2.media.get_video_upload_result. No more than 5.

Tham số Response

TênKiểuMẫuMô tả
errorstringLoại lỗi nếu có lỗi xảy ra. Trống nếu không có lỗi.
messagestringChi tiết lỗi nếu có lỗi xảy ra. Trống nếu không có lỗi.
request_idstring2af852cd-7420-4714-b7cd-33317f6fe548Mã định danh của yêu cầu API dùng để theo dõi lỗi.
responseobjectDetail informations you are querying.
success_listobject[]The danh sách video post successfully.
success_video_upload_idstringsg-11110199-6v9an-mgfwrq9n668d44The video_upload_id post successfully.
post_idstringYwOo_gZqCACXbM0UAAAAAA==The mã định danh duy nhất for post Shopee Video.
failure_listobject[]The danh sách video post failed.
fail_video_upload_idstringsg-11110199-6v9an-mgfwrq9n668d44Failed video_upload_id.
failed_reasonstringcan not find video infoFailed reason of the corresponding video_upload_id.

Dữ liệu gửi

Unirest.setTimeouts(0, 0); HttpResponse<String> response = Unirest.post("https://partner.shopeemobile.com/api/v2/video/post\_video?access\_token=access\_token&partner\_id=partner\_id&sign=sign&timestamp=timestamp&user\_id=user\_id") .header("Content-Type","application/json") .body("{ "video_upload_id_list": [ "sg-11110199-6v8gq-mgbni6rb44qz04" ] }") .asString();<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://partner.shopeemobile.com/api/v2/video/post\_video?access\_token=access\_token&partner\_id=partner\_id&sign=sign&timestamp=timestamp&user\_id=user\_id', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => '{ "video_upload_id_list": [ "sg-11110199-6v8gq-mgbni6rb44qz04" ] }', CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), )); $response = curl_exec($curl); curl_close($curl); echo $response; curl --location --request POST 'https://partner.shopeemobile.com/api/v2/video/post\_video?access\_token=access\_token&partner\_id=partner\_id&sign=sign&timestamp=timestamp&user\_id=user\_id'
--header 'Content-Type: application/json'
--data-raw '{ "video_upload_id_list": [ "sg-11110199-6v8gq-mgbni6rb44qz04" ] }' import requests import json url = "https://partner.shopeemobile.com/api/v2/video/post\_video?access\_token=access\_token&partner\_id=partner\_id&sign=sign&timestamp=timestamp&user\_id=user\_id" payload=json.dumps({ "video_upload_id_list": [ "sg-11110199-6v8gq-mgbni6rb44qz04" ] }) headers = { 'Content-Type': 'application/json' } response = requests.RPCRequest("POST",url,headers=headers, data=payload, allow_redirects=False) print(response.text)

], "failure_list": [] }, "request_id": "75c5e630-830a-430c-a467-d779c4c36a14" }

] }, "request_id": "7b51bfc6-f619-4b98-94fc-2195e80c1bc0" }