This API should be called on the server side and cannot be called directly on the client side (Mini Program, web page, APP, etc.). For details, please refer to API Call Guide.
API English Name: batchProcessDramaPromotion
-
Note for developers: Before using this API, please read and agree to the Weixin Mini Program Platform Short Drama Promotion Program Cooperation Agreement. By using this API in any manner, you confirm your consent to the Weixin Mini Program Platform Short Drama Promotion Program Cooperation Agreement and voluntarily agree to all terms, including but not limited to program authorization, revenue sharing, and liability. If you do not agree, please do not use this API.
-
After configuring via this API, you can batch add or remove programs from the Short Drama Promotion Program. By confirming and agreeing to use this API to add short dramas to the promotion program, you are deemed to have proactively initiated promotional cooperation in accordance with the Weixin Mini Program Platform Short Drama Promotion Program Cooperation Agreement and granted Tencent the relevant rights to the program.
1. Call Method
HTTPS Call
POST https://api.weixin.qq.com/wxadrama/batchprocessdramapromotion?access_token=ACCESS_TOKEN
Cloud Call
- This API does not support cloud call.
Third-party Call
-
This API supports third-party platforms on behalf of Merchant call.
-
The permission set ID of this API is: 157
-
After the service provider obtains one of the permission set authorizations, it can use authorizer_access_token to call on behalf of Merchant, for details please refer to Third-party Call documentation.
2. Request Parameters
Query Parameters Query String Parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| access_token | string | Yes | ACCESS_TOKEN | API call credential, you can use access_token, authorizer_access_token |
Request Body Request Payload
| Parameter | Type | Required | Description |
|---|---|---|---|
| action_type | number | Yes | Action type. 1 - Join program; 2 - Query program; 3 - Exit program. |
| list | objarray | Yes | Array of short dramas |
Body.list(Array) Object Payload
Array of short dramas
| Parameter | Type | Required | Description |
|---|---|---|---|
| src_appid | string | Yes | AppID of the Mini Program that submitted the program for review |
| drama_id | string | Yes | ID of the program submitted for review |
3. Response Parameters
Response Body Response Payload
| Parameter | Type | Description |
|---|---|---|
| errcode | number | Error code |
| errmsg | string | Error message |
| list | objarray | Array of short dramas |
Res.list(Array) Object Payload
Array of short dramas
| Parameter | Type | Description |
|---|---|---|
| src_appid | string | AppID of the Mini Program that submitted the program for review |
| drama_id | string | ID of the program submitted for review |
| status | number | Short drama status. 0 - Not joined; 1 - Under review; 2 - Review passed; 3 - Review rejected; 4 - Exiting program; 5 - Has been delisted |
4. Notes
- This API must be invoked by the Mini Program associated with the program submission for review. That is, the appid corresponding to the access_token must be equal to src_appid.
- The maximum number of short dramas that can be added in a single batch is 100.
- Short dramas must have a bitrate greater than 0.5 Mbps and a resolution greater than 720p.
- If any short drama included in the batch does not meet the conditions when joining the program, the addition of all short dramas in this request will fail. Developers can query the status of the short dramas by using the batch query with action_type=2.
5. Code Example
5.1 Example request for joining/exiting the program
Request Example
This example only demonstrates joining the program. To exit the program, change action_type to 3.
{
"action_type": 1,
"list": [
{"src_appid":"example_src_appid", "drama_id":"123456"},
{"src_appid":"example_src_appid", "drama_id":"123457"}
]
}
Response Example
{
"errcode":0,
"errmsg":"ok"
}
{ // When joining the program, if the resolution or bitrate does not meet the conditions
"errcode":106017,
"errmsg":"Insufficient resolution or bitrate"
}
{ // When joining the program, if a short drama with the same content already exists in the authorization library
"errcode":106018,
"errmsg":"A short drama with identical content already exists in the official authorization library. Please do not authorize it again."
}
5.2 Example request for querying the program
Request Example
{
"action_type": 2,
"list": [
{"src_appid":"example_src_appid", "drama_id":"123456"},
{"src_appid":"example_src_appid", "drama_id":"123457"}
]
}
Response Example
{
"list": [
{"src_appid":"example_src_appid", "drama_id":"123456", "status": 0 },
{"src_appid":"example_src_appid", "drama_id":"123457", "status": 1 }
],
"errcode":0,
"errmsg":"ok"
}
6. Error Codes
The following is the error code list of this API, other error codes can refer to Common Error Codes; When encountering errors in calling the API, you can use the official API Diagnostic Tool to assist in locating and analyzing problems.
| Error Code | Error Description |
|---|---|
| -1 | System error, please try again |
| 0 | Success |
| 1 | Does not exist |
| 2 | Invalid parameter |
| 21000 | This program is not authorized for playback. Please authorize it via the backend API. |
| 21001 | The encrypted sessionkey for the user does not exist |
| 21002 | The merchant's encrypted package is not Base64 encoded |
| 21003 | Failed to decrypt the merchant's encrypted package. Please ensure it is encrypted according to the encryption scheme provided in the integration documentation, or that the sessionkey is the latest one for the current user. |
| 21004 | The plaintext before merchant encryption is not in a valid JSON format or the field types are incorrect. Please check according to the integration documentation. |
| 21005 | The required parameter values (openid, src_appid, and drama_id) in the merchant encryption are empty |
| 21006 | The input parameters of the player do not match the parameter values in the merchant's encrypted package |
| 21007 | The openid in the encrypted package is invalid |
| 21008 | 21008 Developer has not enabled pre-fetching |
| 21009 | 21009 Insufficient merchant traffic |
7. Applicable Scope
The callable account types for this API are not yet clear, or are determined by the calling parameters in business. Please refer to the actual calling situation.