
# 刷新token接口
#### 场景描述
刷新token值。
#### 接口方法
Post
#### 接口URI
https://域名/rest/isales/v1/openapi/obs/auth/refresh，例如域名是service.besclouds.com。
#### 请求说明
表1请求头参数 
| 序号 | 名称             | 参数类型   | 是否必选 | 说明                                                                                                                                               |
|:---|:---|:---|:---|:---|
| 1  | Content-Type   | String | True | 请填写"application/json"或者 charset=UTF-8 |
| 2  | Authentication | String | True | token鉴权字段，请配置为[鉴权接口](https://support.huaweicloud.com/api-ccfs-cec/cec_07_0313.html#ZH-CN_TOPIC_0000002513073485)中返回的refreshToken参数值。             |
   
#### 响应说明
- **响应状态码: 200**
  表2响应体参数 
  | 序号 | 名称         | 参数类型   | 说明                                                                                                                                                                                                                               |
  |:---|:---|:---|:---|
  | 1  | result     | String | 错误码。取值如下： 0：成功 非0：失败 |
  | 2  | resultData | Object | 查询成功后，返回结果信息的对象。                                                                                                                                                                                                                 |
     
  表3resultData对象 
  | 序号 | 参数                    | 类型     | 描述            |
  |:---|:---|:---|:---|
  | 1  | token                 | String | 鉴权token字段     |
  | 2  | tokenExpirationTime   | String | 鉴权字段token有效时间 |
  | 3  | refreshToken          | String | 刷新token       |
  | 4  | refreshExpirationTime | String | 刷新token有效时间   |
     
  
 
#### 错误码
- **响应状态码: 400**
  错误的请求：请检查请求路径及参数。
  
- **响应状态码: 401**
  未授权：1. 请确认是否购买了相关服务。 2. 请联系客服人员检查您账号的当前状态。
  
- **响应状态码: 403**
  鉴权失败。
  
- **响应状态码: 404**
  请求的内容未找到：请检查请求的路径。
  
- **响应状态码: 500**
  业务失败：请依次确认您请求中各参数的取值。
  
  
 
#### 报文样例
- 请求头：
```
Content-Type:application/json
Authentication：Bearer e3fca9398eaa5cef4b57b523b9c75fae
```
- 请求消息：
```
{
"refreshToken":"dfjiaodjfaf"
}
```
- 响应消息：
  ```
  {
  "result":0,   // 0：成功，其他失败
      "resultData": {
          "token":"fajiofjqwioeha",
          "tokenExpirationTime":300,// 单位秒
          "refreshToken":"fajiofjqwioeha",
          "refreshExpirationTime":3600,// 单位秒
  }
  }
  ```
  
 
