POST
名称 | 类型 | 必填 | 描述 |
Content-Type | string | 是 | 固定值: application/x-www-form-urlencoded |
名称 | 类型 | 必填 | 描述 |
client_id | string | 是 | 自建应用的 Client ID示例值:i-3f7f5**************************d0 |
client_secret | string | 是 | 自建应用的 Client Secret示例值:HydF******************************{lnL |
grant_type | string | 是 | 固定值: client_credentials示例值:client_credentials |
名称 | 类型 | 描述 |
access_token | string | 访问凭证 |
token_type | string | 凭证类型。目前为不记名凭证,即 Bearer |
expires_in | int | 凭证的有效期,单位:秒。 |
POST https://oauth2.account.tencentid.com/authz/oidc/v2/13580***********30/tokenContent-Type: application/x-www-form-urlencodedclient_id=i-3f7f5*************************d0&client_secret={secret}&grant_type=client_credentials
{"access_token": "eyJhb***********************gw","token_type": "Bearer","expires_in": 1800}
错误码 | 描述 |
invalid_request | 缺少 client_id / client_secret,或 grant_type 非 client_credentials |
invalid_client | client_id 不存在、应用已禁用,或 secret 不匹配 |
invalid_grant | 应用未启用 client_credentials 授权类型 |
unsupported_grant_type | grant_type 取值不支持 |
文档反馈