刷新 token
| 属性 | 值 |
|---|---|
| HTTP 方法 | POST |
| 接口路径 | /api/refreshToken.do |
| 所属分类 | 认证 API |
接口说明
接口路径:/api/refreshToken.do
HTTP 方法:POST
HTTP 方法: POST
HTTP Header
该接口使用 Basic Auth 的方式校验 client 的信息。具体做法是在 header 中添加类似于"Authorization: Basic xxxxxxxxx"。其中 "xxxxxxxxx"是通过 client_id 和 client_secret 算出来的,具体算法为 Base64Encode(client_id + ":" + client_secret)
URL 参数
参数名 Comment(说明) grant_type(必填) 必须为 refresh_token string refresh_token(必填) 即接口 2 中获取到的 refresh_token string 例如: /api/refreshToken.do?grant_type=refresh_token&refresh_token=xxx 返回结果 access_token 接口访问标识, refresh_token 用来刷新 access_token,有效时间为 30 天 expires_in access_token 的有效时间 为 3600,单位为 s
三、 文件访问 API
所有的接口在访问时需要在 HTTP header 中带上 access_token。对于含有请求参数的接口,通常是一些 POST、 PUT 或者 DELETE 接口,还需要设置 Content-Type 来指定参数的格式。如果需要访问不同版本的 API,就需要 在请求路径上指定具体版本,如果需要返回不同格式的 response body,那么还需要设置 Accept。所有的参数都应 该采用 utf-8 的编码。
调用说明
- 调用前需完成 获取 token 或相应免登录认证,并在请求 Header 中携带
Authorization: Bearer <access_token>。 - 参数和返回字段如因部署版本存在差异,应以实际私有云 API 文档和联调结果为准。
- 所属分类:认证 API。