AILIVE文档
API 参考接口列表

领取与刷新令牌

`grantType: request` 按申请返回的轮询间隔查询审批结果,批准后得到 Bearer 访问令牌和刷新令牌;`grantType: refresh_token` 用刷新令牌换一组新令牌,旧的刷新令牌随即失效。

POST
/v1/connect/token

请求正文

application/json
  1. body

request: poll for the decision. refresh_token: rotate the tokens.

grantType*Granttype
可选值"request""refresh_token"
pollToken?|null
refreshToken?|null
requestId?|null

响应正文

Successful Response

application/json
  1. response
accessToken*Accesstoken
connectionId*Connectionid
格式uuid
expiresIn*Expiresin
interaction*Interaction

Whether one of this connection's sources reads the interaction platform room

refreshToken*Refreshtoken
room*
scopes*array<>
tokenType*Tokentype
请求示例
curl -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"}