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: setPlayerDramaRecmdSwitch
Developers can use the backend API to select playing the original video uploaded without transcoding.
Developers can use the backend API to control enabling or disabling recommended slots.
1. Call Method
HTTPS Call
POST https://api.weixin.qq.com/wxadrama/setplayerdramarecmdswitch?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 | Example | Description |
|---|---|---|---|---|
| entry_type | number | Yes | 2002 | Fill in 2002 here (when controlling recommended slots, available values are: 1-End of series, 2-Recommended at the far right of episodes, 3-Related recommendations on the series profile page) |
| switch_status | boolean | Yes | true | true-Enable, false-Disable. If never enabled, the default is disabled (when controlling recommended slots: true-Enable, false-Disable; 1-End of series and 3-Series profile page are enabled by default) |
3. Response Parameters
Response Body Response Payload
| Parameter | Type | Description |
|---|---|---|
| errcode | number | Error Code |
| errmsg | string | Error Message |
4. Notes
No special notes for this API
5. Code Example
5.1 Play Original Video
Request Example
{
"entry_type": 2002,
"switch_status": "true"
}
Response Example
{
"errcode": 0,
"errmsg": "ok"
}
5.2 Recommended Slot Control
Request Example
{
"entry_type":1,
"switch_status": true
}
Response Example
{
"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 | Not found |
| 2 | Invalid parameter |
| 21000 | This series is not authorized for playback. Please authorize it via the backend API. |
| 21001 | The user's encrypted session key 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 in the integration documentation, or that the session key used is the latest one for the current user. |
| 21004 | The plaintext before merchant encryption is not valid JSON format or the field types are incorrect. Please check the integration documentation. |
| 21005 | Required parameter values in the merchant encryption (openid, src_appid, and drama_id) are empty. |
| 21006 | The player input parameters 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.