Polyv Help Center

Help Center

Generate Login Token

Updated: 2023-06-05 18:26:02

1. API Description

生成观看页观众登录 Token(loginToken)

2. API URL

https://api.polyv.net/live/v3/channel/watch/get-api-token

3. Request Method

POST

4. Request Parameter Description

Parameter Required Type Description
appId true String appId
timestamp true Long 13-digit timestamp
sign true String Signature, refer to Polyv's common signature method
channelId true Integer Channel ID
viewerId true String Viewer ID
nickname false String Viewer nickname
avatar false String Viewer avatar
openid false String Viewer OPENID
actor false String Viewer title
param4 false String Custom Param4 parameter
param5 false String Custom Param5 parameter

5. 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
requestId String Request identifier
message String Response message
data Object Response object [see data field description for details]

5.1 Data Field Description

Parameter Type Description
token String Viewer token for the watch page

6. Response Example

{
    "code": 200,
    "status": "success",
    "message": "",
    "data": {
        "token": "a049b525e0"
    }
}
联系客服,在线咨询