文档
测试

APPID获取token

POST
/auth/oauth/token

接口描述

APPID获取请求token https请求

请求参数

参数名
类型
描述
必填
grant_type
String
client_credentials(授权模式)
必填
client_id
String
授权客户端id
必填
client_secret
String
授权客户端key
必填

响应参数

参数名
类型
描述
必填
access_token
String
令牌token
必填
token_type
String
令牌类型
必填
expires_in
long
过期时间
必填
scope
String
授权范围
必填
jti
String
JWT ID
必填

说明 / 示例

获取token curl -d "grant_type=client_credentials&client_id=HQLX&client_secret=eter23423" http://11.75.1.51/auth/oauth/token 返回结果 {"access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJzZXJ2ZXIiXSwiZXhwIjoxNTY4NjQ0NDU0LCJhdXRob3JpdGllcyI6WyJjbGllbnQiXSwianRpIjoiMWRiNjA4MTAtNTA4Yi00MjVmLTk2NTgtODFkZDAzYWUyNDA1IiwiY2xpZW50X2lkIjoiSFFMWCJ9.7ENYrWlFhG13vaTu89d9qBh_gEAPf19GxtPulzKxKFg","token_type":"bearer","expires_in":42667,"scope":"server","jti":"1db60810-508b-425f-9658-81dd03ae2405"} 失败 {"error":"invalid_client","error_description":"Bad client credentials"}