Tencent Cloud Government Enterprise Live Streaming Order Interface
Updated: 2023-04-04 09:31:23
Interface Description
1、该接口接收用户购买信息,通知保利威工作人员,由工作人员线下开通账号。
2、(timestamp, appId, signatureNonce)参与sign签名,并和sign一起通过url传递,请求体参数不参与签名,通过post请求体传递【请设置请求头contentType:application/json】
3、接口支持https协议
Interface URL
http://api.polyv.net/live/v4/root/order/create
Request Method
POST
Interface Constraints
The interface supports both HTTP and HTTPS. HTTPS is recommended to ensure interface security. Interface calls have frequency limits. See details
At least one of basic service or premium service must be included, otherwise an exception will be returned.
The one-time validation parameter signatureNonce is used to prevent network replay attacks.
Request Parameter Description
| Parameter | Required | Type | Description |
|---|---|---|---|
| appId | true | String | Enterprise-level appId, provided by Polyv |
| timestamp | true | Long | Current 13-digit millisecond timestamp, valid for 3 minutes |
| sign | true | String | Signature, where appSecret is the enterprise-level appSecret provided by Polyv, a 32-character uppercase MD5 value [See Signature Generation Rules] |
Request Body Parameter Description
| Parameter | Required | Type | Description |
|---|---|---|---|
| UIN | true | String | Tencent account identifier, maximum length 30 |
| orderId | true | String | Order number. Duplicate order numbers will throw an exception, error.code=35002, maximum length 70 |
| true | String | Customer email, maximum length 30 | |
| mobile | true | String | Customer phone number, length 11 |
| contact | false | String | Customer name, length 30 |
| basicService | false | Array | Basic service [See BasicService Parameter Description], At least one of basic service or premium service must be included |
| premiumService | false | Array | Premium service [See PremiumService Parameter Description], At least one of basic service or premium service must be included |
BasicService Parameter Description
| Parameter | Required | Type | Description |
|---|---|---|---|
| type | true | String | Basic service type [See Basic Service Type Description], standard: Standard Edition; enterprise: Enterprise Edition; flagship: Flagship Edition; |
| number | Integer | Renewal duration, unit: year |
PremiumService Parameter Description
| Parameter | Required | Type | Description |
|---|---|---|---|
| type | true | String | Premium service type [See Premium Service Type Description], premium_package: Premium expansion pack, unit: piece; group_account: Group account, unit: year; quality_analysis: Quality analysis, unit: year; live_transfer: Live stream relay, unit: time; link_mic_time: Cloud live mic connection, unit: minute; playback_store: Playback storage, unit: GB; playback_flow: Playback traffic, unit: GB; channel_number: Channel count, unit: piece; live_time: Live streaming minutes, unit: minute; monitoring_time: Studio minutes, unit: minute; |
| number | true | Integer | Renewal quantity |
Basic Service Type Description
| Type Code | Service Type | Feature Description | Unit |
|---|---|---|---|
| standard | Standard Edition | Live streaming system product platform, includes 1 million minutes (valid for 1 year), 200 channel numbers | Year |
| enterprise | Enterprise Edition | 2.5 million minutes, valid for 1 year, 500 channel numbers | Year |
| flagship | Flagship Edition | 5 million minutes, valid for 1 year, 1000 channel numbers | Year |
Premium Service Type Description
| Type Code | Service Type | Feature Description | Unit |
|---|---|---|---|
| premium_package | Premium Expansion Pack | Live streaming system product platform, includes 1 million minutes (valid for 1 year), 200 channel numbers | Year |
| group_account | Group Account | Group accounts can create multiple sub-accounts and allocate or reclaim minutes, traffic, and storage to these sub-accounts | Year |
| quality_analysis | Quality Analysis | From the radar chart, 4 indicators are displayed counterclockwise from the top: Live viewing enthusiasm, Live replay viewing, Viewing concentration, Viewing interaction | Year |
| live_transfer | Live Stream Relay | After starting a broadcast via Polyv, the multi-channel relay service supports pushing the local live stream to third-party platforms (e.g., Phoenix TV, bilibili, WeChat Channels, iQiyi) for promotion, expanding the live stream's reach and influence. Simultaneously relays live content to multiple platforms, generally used for multi-platform promotion to achieve better live broadcast dissemination | Time |
| link_mic_time | Cloud Live Mic Connection | Remote live mic connection, the host and audience can engage in real-time audio/video mic connection with zero-latency interaction, supporting up to 17 people | Minute |
| playback_store | Playback Storage | Space: The video size of live replay videos transferred to on-demand storage, billed annually | GB |
| playback_flow | Playback Traffic | Traffic: Traffic generated from playing back replay videos | GB |
| channel_number | Channel Number | Refers to the live room number, can be used to start multiple live streams repeatedly | Piece |
| live_time | Live Streaming Minutes | Duration users can watch the live stream | Minute |
| monitoring_time | Studio | The studio can preview the live stream画面, supports multi-screen switching and delayed live streaming, allowing on-demand switching of video signals while also preparing for unexpected situations during live events | Minute |
Example
http://api.polyv.net/live/v4/root/order/create?appId=frlr1zazn3&sign=E3F501CFEF5FCCF2DF9BFDCE9C91F48C×tamp=1629445373947
Request body JSON parameters:
{
"orderId":"20999126-2c9d-4d3b-9438-c2945161d252",
"email":"admin@polyv.net",
"mobile":"18888888888",
"contact":"张三",
"basicService":{
"type":"flagship",
"number":1
},
"premiumService":[
{
"type":"",
"number":""
}
]
}
Response Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Status code, same as HTTP status code, used to determine the basic response status |
| status | String | Response result, determined by the business. Returns success on success, error on failure |
| success | Boolean | Whether the response was successful |
| requestId | String | Request ID, a unique UUID generated for each request, only used for troubleshooting and debugging, should not be tied to business logic |
| data | Boolean | Request response object, returns true on success, false on failure |
| error | Object | Error information [See Error Parameter Description] |
Error Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Error code, used to determine the specific error reason |
| desc | String | Error description, corresponds to error.code |
Java Request Example
For quick integration of basic code, please download the relevant dependency source code, click here to download the source code. After downloading, add it to your own source project. The test cases include HttpUtil.java and LiveSignUtil.java in the downloaded file.
Response Example
For system global error descriptions, see Global Error Description
Success Example
{
"code": 200,
"status": "success",
"requestId": "847f0716fa76461baf8979aaa4415dc3.67.16342672396023837",
"data": true,
"success": true
}
Error Example
{
"code": 400,
"status": "error",
"requestId": "4081dbac03e6441e8bdd301d8feee5a2.124.16360831818611581",
"error": {
"code": 20001,
"desc": "application not found."
},
"success": false
}
