旧版重新登录
接口功能
Token过期,成功登录过且refresh_token有效的情况下优先选择该接口刷新Token
请求地址:(二选一)
旧版:
URL:
[Id Server]/core/connect/token
新版:
URL:
[Host Server]/idserver/core/connect/token
地址参数说明
参数名 参数类型 参数描述 Id Server string 详情见名词解释 Method
POST
Headers:
NULL
Body
参数名 参数类型 参数描述 refresh_token string 登录接口获得的refresh_token scope string openid offline_access fbox email profile client_id string 客户端编号 client_secret string 客户端密码 grant_type string refresh_token 注意 :
HTTP的Content-Type(body的格式)为application/x-www-form-urlencodedclient_id\client_secret为服务器为各种客户端所创建的用户名、密码用于区分各类 客户端,请联系与贵公司对接的销售获取。
scope
和grant_type
为描述中所述固定值。返回字段
字段名 类型 描述 access_token string accessToken expires_in int accessToken的有效期 refresh_token string accessToken过期后,刷新accessToken token_type string accessToken的类型(Bearer)固定值 返回码
返回码 描述 401 refresh_token过期或者错误 429 被服务器拒绝(调用过于频繁,客户端被禁止等) 注意:
登录接口返回invalid_type
或者invalid_grant
都为登录信息有误。
调用案例如下图: