API 参考接口列表
领取与刷新令牌
`grantType: request` 按申请返回的轮询间隔查询审批结果,批准后得到 Bearer 访问令牌和刷新令牌;`grantType: refresh_token` 用刷新令牌换一组新令牌,旧的刷新令牌随即失效。
POST
application/json- body
request: poll for the decision. refresh_token: rotate the tokens.
grantType*Granttype可选值
"request""refresh_token"pollToken?|nullrefreshToken?|nullrequestId?|nullSuccessful Response
application/json- response
accessToken*AccesstokenconnectionId*Connectionid格式
uuidexpiresIn*Expiresininteraction*InteractionWhether one of this connection's sources reads the interaction platform room
refreshToken*Refreshtokenroom*scopes*array<>tokenType*Tokentypecurl -X POST 'https://api.ailive.studio/v1/connect/token' \ -H 'Content-Type: application/json' \ -d '{ "grantType": "request"}'响应示例
{ "accessToken": "string", "connectionId": "84b500d7-71c8-4b1f-adf4-f1eb0000973d", "expiresIn": 0, "interaction": true, "refreshToken": "string", "room": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "scopes": [ "room:read" ], "tokenType": "Bearer"}