全国服务热线
400-023-1111
关注八戒财税
微信公众号
抖音账号
名称 | 类型 | 是否必须 | 描述 |
grant_type | STRING | 必须 | 目前只能为client_credentials |
client_id | STRING | 必须 | 您申请应用获得的appKey(查看) |
client_secret | STRING | 必须 | 您申请应用获得的appSecret(查看) |
scope | STRING | 可选 | 权限范围 |
POST /oauth/token HTTP/1.1
Host: open.cs.zbj.com
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials
&client_id=xxxxxxxxxx
&client_secret=xxxxxxxxxx
名称 | 类型 | 是否必须 | 描述 |
access_token | STRING | 必须 | 访问令牌 |
token_type | STRING | 必须 | 访问令牌类型,始终为Bearer |
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: no-store
Pragma: no-cache
{
"access_token":"2YotnFZFEjr1zCsicMWpAA",
"token_type":"Bearer"
}
HTTP状态码 | 错误信息 | 描述 |
400 | Bad Request | Authorization格式错误 |
403 | AppKey or appSecret is incorrect | 应用的appkey或appSecret不正确、应用被停用 |
403 | The app is not enabled or the number of interface calls has been exhausted | 应用充值点已消耗完 |
501 | Unsupported grant type | grant_type错误 |
500 | server_error | 未知系统错误,请反馈给技术支持 |
HTTP/1.1 403 Forbidden
Content-Type: application/json;charset=UTF-8
Cache-Control: no-store
Pragma: no-cache
{
"success": false,
"data":"AppKey or appSecret is incorrect"
}