查询OAuth授权会话的当前状态及授权结果。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
POST /v2/{instanceId}/oauthAuthorizationSessions/_/actions/get HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| instanceId |
string |
是 |
实例 ID。 |
idaas_ue2jvisn35ea5lmthk267xxxxx |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| Authorization |
string |
是 |
认证信息。 格式为:Bearer ${access_token}。 说明
请输入 IDaaS 签发的 Access Token。 |
Bearer xxxxxx |
| body |
object |
否 |
请求 Body。 |
|
| sessionUri |
string |
是 |
授权会话 URI。 说明
由 FetchOAuthAuthenticationToken 调用返回。 |
urn:ietf:params:oauth:request_uri:atpoas_01l6ljnvrpc5niakl3gj3amxxxxxx |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
OAuth 授权会话详情。 |
||
| instanceId |
string |
实例 ID。 |
idaas_ue2jvisn35ea5lmthk267xxxxx |
| sessionId |
string |
授权会话 ID。 |
atpoas_01l6losojlojbbv01adsq56xxxxx |
| sessionUri |
string |
授权会话 URI。 |
urn:ietf:params:oauth:request_uri:atpoas_01l6ljnvrpc5niakl3gj3amxxxxxx |
| sessionStatus |
string |
授权会话状态。 枚举值:
|
pending |
| credentialProviderIdentifier |
string |
凭据提供商业务标识。 |
test_example_identifier |
| consumerType |
string |
认证令牌使用者类型。 枚举值:
|
application |
| consumerId |
string |
认证令牌使用者 ID。 |
app_ngtkgrrxxxxktg5eao6z4xxxxx |
| creatorType |
string |
认证令牌创建者类型。 枚举值:
|
application |
| creatorId |
string |
认证令牌创建者 ID。 |
app_ngtkgrrxxxxktg5eao6z4xxxxx |
| authorizationUrl |
string |
用户授权 URL。 |
https://login.dingtalk.com/oauth2/auth?client_id=... |
| expirationTime |
integer |
认证令牌过期时间,Unix 时间戳,单位毫秒。 |
1704153600000 |
| authenticationTokenId |
string |
认证令牌 ID。 |
atntkn_01l6lot7o4e4r77oelp6qtuxxxxx |
| errorCode |
string |
错误码。 |
access_denied |
| errorDescription |
string |
错误描述。 |
The user denied the authorization request |
示例
正常返回示例
JSON格式
{
"instanceId": "idaas_ue2jvisn35ea5lmthk267xxxxx",
"sessionId": "atpoas_01l6losojlojbbv01adsq56xxxxx",
"sessionUri": "urn:ietf:params:oauth:request_uri:atpoas_01l6ljnvrpc5niakl3gj3amxxxxxx",
"sessionStatus": "pending",
"credentialProviderIdentifier": "test_example_identifier",
"consumerType": "application",
"consumerId": "app_ngtkgrrxxxxktg5eao6z4xxxxx\n",
"creatorType": "application",
"creatorId": "app_ngtkgrrxxxxktg5eao6z4xxxxx",
"authorizationUrl": "https://login.dingtalk.com/oauth2/auth?client_id=...",
"expirationTime": 1704153600000,
"authenticationTokenId": "atntkn_01l6lot7o4e4r77oelp6qtuxxxxx",
"errorCode": "access_denied",
"errorDescription": "The user denied the authorization request"
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。