Create Group Sub-Account
Updated: 2022-12-19 11:46:20
API Description
1、创建集团分帐号
2、(timestamp, appId)参与sign签名,并和sign一起通过url传递,请求体参数不参与签名,通过post请求体传递【请设置请求头contentType:application/json】
3、接口支持https协议
API URL
http://api.polyv.net/live/v4/group/user/isolation/create
Request Method
POST
API Constraints
The API supports both HTTP and HTTPS. HTTPS is recommended for security. API calls have frequency limits. See details
For group account API signature calculation, use the appId and appSecret of the group master account.
The usage billing plan for sub-accounts follows the group master account. Minute-based billing can only allocate minutes, and concurrent billing can only allocate concurrency.
Request Parameter Description
| Parameter | Required | Type | Description |
|---|---|---|---|
| appId | true | String | Group master account appId |
| timestamp | true | Long | Current 13-digit millisecond timestamp, valid for 3 minutes |
| sign | true | String | Signature, a 32-character uppercase MD5 value. The appSecret key used to generate the signature is critical for communication data security. It must not be stored or used directly on the client side. All APIs must be called through the customer's own server to relay requests to the POLYV server for response data. See signature generation rules |
Request Body Parameter Description
| Parameter | Required | Type | Description |
|---|---|---|---|
| true | String | ||
| password | true | String | Password, must contain both numbers and letters, length 8-32 characters |
| contacts | false | String | Contact person |
| phone | false | String | Phone number. A phone number cannot be bound to more than 3 emails |
| maxChannels | false | Integer | Maximum number of channels that can be created |
| minutes | false | Integer | Minutes. Required if the master account uses minute-based billing |
| concurrent | false | Integer | Concurrency. Required if the master account uses concurrent billing |
| balance | false | Float | Amount, cannot be less than 0 |
| memo | false | String | Remark, up to 50 characters |
| expireType | false | String | Expiration type group: Follows the master account custom: Custom |
| expireDate | false | String | Account expiration date, format MMMMYYDD, e.g., 20220428 |
| remainFlow | false | Integer | VoD traffic, unit G, default not allocated |
| remainSpace | false | Integer | VoD storage, unit G, default not allocated |
Example
http://api.polyv.net/live/v4/group/user/isolation/create?appId=ga1ayl6dh2×tamp=1659661189000&sign=FADA4FF2C43FB250990BF3EC1BCEA32B
Request Body Parameters
{
"email": "polyv111@polyv.net",
"password": "polyv111",
"minutes": 100,
"remainSpace":100
}
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 business logic. Returns success on success, error on failure |
| success | Boolean | Whether the request was successful |
| requestId | String | Request ID, a unique UUID generated for each request. Only used for troubleshooting and debugging, not related to business logic |
| error | Object | Error information when status code is not 200 See Error field description |
| data | Object | See data field 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 |
Data Parameter Description
| Parameter | Type | Description |
|---|---|---|
| appId | String | Application ID |
| appSecret | String | Application Secret |
| userId | String | User global ID |
Java Request Example
Response Example
For system-wide error descriptions, see Global Error Description
Success Example
{
"code": 200,
"status": "success",
"requestId": "c7e83b9751fa4bfe9f57ba45494c147a.57.16529371726540445",
"data": {
"appId": "xxxxx",
"appSecret": "xxxxxxxxxxxx",
"userId": "xxxxxx"
},
"success": true
}
Error Example
{
"code": 400,
"status": "error",
"error": {
"code": 10003,
"desc": "时间戳过期"
},
"success": false
}
