Live Quiz - Add WeChat User's Resurrection Card
Interface URL
http://api.polyv.net/live/v2/qa/addrevive
Interface Description
- Function: Get the live broadcast status of the channel
- The interface supports HTTPS protocol
Request Method
GET
Request Parameter Restrictions
true
Request Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| appId | Yes | string | Non-business parameter, obtained from API settings, the appId registered in the live system |
| timestamp | Yes | string | Current time in milliseconds (13 digits, valid for 3 minutes) |
| unionIds | Yes | string | Multiple WeChat account unionIds, separated by English commas |
| num | Yes | int | Number of resurrection cards to add |
| sign | Yes | string | Verification signature, 32-character uppercase MD5 value |
Successful Response JSON Example:
{
"code": 200,
"status": "success",
"message": "",
"data": ""
}
Field Description
| Parameter | Description |
|---|---|
| status | Response status |
| data | Response result |
| message | Error message |
PHP Request Example
<?php
$appId = "epxt70r96u";
$timestamp = time()*1000;
$unionIds = "test1,test2";
$num = 1;
$appSecret = "cb4a16edc2ef4f78941e00cd0b3bd867";
$str = $appSecret."appId$appId"."num$num"."timestamp$timestamp"."unionIds$unionIds".$appSecret;
$sign = strtoupper(md5($str));
$url = "http://api.polyv.net/live/v2/qa/addrevive?";
echo file_get_contents($url."appId=$appId"."×tamp=$timestamp"."&unionIds=$unionIds"."&num=$num"."&sign=$sign");
?>
Signature Rules:
Arrange the request parameters in dictionary order by parameter name, concatenate the parameter name and value, prepend and append the appSecret, and generate a 32-character uppercase MD5 value as the sign. The following is an example process:
Request parameters: timestamp = "1494399085000" appId = "egymbtsf38"
Arrange the request parameters in dictionary order by parameter name: appId = "egymbtsf38" timestamp = "1494399085000"
Concatenate the string: concatenate the parameter name and value, prepend and append the appSecret (here the appSecret value is 6ef8d34c08f44e91a18428842ff0ba7e), as follows: 6ef8d34c08f44e91a18428842ff0ba7eappIdegymbtsf38timestamp14943990850006ef8d34c08f44e91a18428842ff0ba7e
Generate the 32-character uppercase MD5 signature sign: 9291DE270E8C79FD4B805CDD45B6BC2B
