获取登录用户身份
POST
https://open.teambition.com/api/oauth/userAccessToken
{
"grantType": "authorizationCode",
"code": "AUTH_CODE",
"expires": 86400
}
{
"grantType": "refreshToken",
"refreshToken": "GEbRxBNedjnXbLwM...",
"expires": 86400
}
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://open.teambition.com/api/oauth/userAccessToken' \
--header 'Authorization: Bearer <appAccessToken>' \
--header 'Content-Type: application/json' \
--data-raw '{
"grantType": "authorizationCode",
"code": "AUTH_CODE",
"expires": 86400
}'
响应示例响应示例
{
"code": 200,
"errorMessage": "",
"result": {
"userId": "5a28e2036176bbde...",
"userAccessToken": "eyJz93ak4laUWwbz...",
"refreshToken": "GEbRxBNedjnXbLwM...",
"tokenType": "Bearer",
"expires": 86400
}
}
请求参数
Header 参数
Content-Type
string
可选
示例值:
application/json
Authorization
string
可选
默认值:
{{Authorization}}
Body 参数application/json
返回响应
修改于 2023-01-06 06:58:02