Polyv Help Center

Help Center

Query Sub-Account List and Remaining Resources

Updated: 2025-10-23 09:23:03

API Description

1、集团账号查询分账号列表及分账号剩余资源
2、接口支持https协议

API URL

http://api.polyv.net/live/v4/group/user/package/list

Online API Call

Request Method

GET

API Constraints

  1. The API supports both HTTP and HTTPS. HTTPS is recommended for security. API calls have frequency limits. See details

  2. For group account APIs, use the group master account's appId and appSecret for signature calculation.

Request Parameter Description

Parameter Required Type Description
appId true String Group master account appId See details in Group Account 2.0 Key Acquisition
timestamp true Long Current 13-digit millisecond timestamp, valid within 3 minutes
sign true String Signature, a 32-character uppercase MD5 value. The appSecret used for signature generation is critical for communication data security. It must never be saved 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 details in Signature Generation Rules
emails false String Sub-account emails, multiple separated by commas, max 100
pageSize false Integer Data size per page, default 10, max 100
pageNumber false Integer Current page number, default 1

Example

http://api.polyv.net/live/v4/group/user/package/list?appId=g8dtv537aq&timestamp=1653484715000&sign=6C95C3A3E93D46A78A86DCDB8930D70A

Response Parameter Description

Parameter Type Description
code Integer Status code, same as HTTP status code, used to determine basic response status
status String Response result, determined by business logic. Returns "success" on success, "error" on failure
success Boolean Whether the response was successful
requestId String Request ID, a unique UUID generated per request. For debugging and troubleshooting only, not for business logic
error Object Error information when status code is not 200 See details in Error Field Description
data Object Bill list See details in Data Field Description

Error Parameter Description

Parameter Type Description
code Integer Error code, used to identify the specific error cause
desc String Error description, corresponding to error.code

Data Parameter Description

Parameter Type Description
pageNumber Integer Current page number
pageSize Integer Data size per page
totalPages Long Total number of pages
totalItems Long Total number of items
contents Array Current page content See details in Contents Field Description

Contents Parameter Description

Parameter Type Description
userId String User ID
appId String Sub-account application ID
appSecret String Sub-account application secret
email String Sub-account email
balance String Remaining balance
phone String Phone number
memo String Notes
contacts String Contact person
chargeType String Cloud live streaming billing type
minutes: Per minute
parallelConcurrent: Parallel concurrent
totalConcurrent: Cumulative concurrent
remainConcurrent Long Cloud live streaming remaining resource, concurrent connections
remainMinutes Long Cloud live streaming remaining resource, available live streaming minutes
remainFlow Float Cloud VOD remaining resource, traffic (GB)
remainSpace Float Cloud VOD remaining resource, storage (GB)
expireType String Expiration type
group: Follows master account
custom: Custom
expireDate Long Account expiration date, 13-digit timestamp
status String Status
normal: Active
expired: Expired
frozen: Frozen
linkMicMinutes Integer Available link mic minutes
guideMinutes Integer Available cloud studio minutes
maxChannels Integer Maximum creatable channels
linkMicLimit Integer Link mic participant limit
vodSecretKey String VOD secret key
vodBakSecretKey String VOD backup secret key
writeToken String VOD write token
readToken String VOD read token
remainAiPptVideoDuration Long Cloud live streaming remaining resource, available video creation minutes
remainAiPptVideoWithDigitalHumanDuration Long Cloud live streaming remaining resource, available video creation (with digital human) minutes

Java Request Example

For quick integration of basic code, please download the relevant dependency source code. Click here to download source code. Add it to your own source project after downloading. The test case files HttpUtil.java and LiveSignUtil.java are included in the download package.

It is strongly recommended to use the Live Java SDK for API integration. The Live Java SDK provides unified encapsulation and optimization for API call logic, exception handling, data signing, and HTTP request thread pools.

private static final Logger log = LoggerFactory.getLogger(ChannelOperateTest.class);
/**
 * 查询分账号剩余资源
 * @throws IOException
 * @throws NoSuchAlgorithmException
 */
@Test
public void groupUserPackageListTest() throws IOException, NoSuchAlgorithmException {
    //公共参数,填写自己的实际参数
    String appId = super.groupAppId;
    String appSecret = super.groupAppSecret;
    String timestamp = String.valueOf(System.currentTimeMillis());
    
    //业务参数
    String url = "http://api.polyv.net/live/v4/group/user/package/list";
    
    //http 调用逻辑
    Map<String, String> requestMap = new HashMap<>();
    requestMap.put("appId", appId);
    requestMap.put("timestamp", timestamp);
    requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
    
    String response = HttpUtil.get(url, requestMap);
    
    log.info("测试查询分账号剩余资源成功:{}", response);
    //do somethings
}

Response Example

For global system error descriptions, see Global Error Description

Success Example

{
    "code": 200,
    "status": "success",
    "requestId": "83991d6d866e4dafa2ed81f9946df302.54.16534840806930299",
    "data": {
        "pageNumber": 1,
        "pageSize": 10,
        "totalPages": 1,
        "totalItems": 1,
        "contents": [
            {
                "userId": "*******",
                "appId": "*******",
                "appSecret": "************",
                "email": "*******@polyv.net",
                "balance": "0",
                "phone": "*******",
                "memo": "aaa",
                "chargeType": "minutes",
                "remainConcurrent": 0,
                "remainMinutes": 100,
                "remainFlow": 100.0,
                "remainSpace": 100.0,
                "expireDate": 1652803200000,
                "status": "normal",
                "contacts": "aaa",
                "expireType": "group",
                "linkMicMinutes": 100,
                "guideMinutes": 100,
                "maxChannels": 10,
                "linkMicLimit": 6,
                "pureRtcEnabled": "N",
                "vodSecretKey": "*******",
                "vodBakSecretKey": "*******",
                "writeToken": "*******-*******-*******-*******-*******",
                "readToken": "*******-*******-*******-*******-*******"
            }
        ]
    },
    "success": true
}

Error Example

{
    "code": 400,
    "status": "error",
    "error": {
        "code": 10003,
        "desc": "时间戳过期"
    },
    "success": false
}
联系客服,在线咨询