---
title: 响应格式说明
description: "```"
url: https://www.hikunpeng.com/document/detail/zh/kunpengdevkithistory/devkit_24_rc3/usermanual/KunpengDevKit_0111.html
sourcePath: /source/zh/kunpengdevkithistory/devkit_24_rc3/usermanual/KunpengDevKit_0111.html
indexId: 880a4bc5afa841d750caf845955887d8e8f2fecaaa07faedcb3f5f8086263c1180
---
# 响应格式说明

#### 返回结果

```
{
"code": "2000",
"message": "认证成功",
"messageArgs": [],
"data": {
"access_token": "*******************************",
"expires_in": 3600,
"refresh_token":"*******************************"
}
}
```


#### 返回参数


**表1 返回参数说明**

| 参数名 | 中文名称 | 参数类型 | 描述 |
| --- | --- | --- | --- |
| access\_token | 认证令牌 | String | 认证后可信任的Token凭证。 |
| expires\_in | 令牌过期时间 | Integer | 数值型数据，单位是秒。如：3600，代表当前access\_token的有效期，最大值为一小时。 若access\_token失效，默认使用refresh\_token并重新获取access\_token。 |
| refresh\_token | 刷新令牌 | String | 在access\_token使用后，用于刷新access\_token的token凭证。该令牌一般持续数小时或数天。 |
| code | 返回值 | String | 数据正常返回“2000”，如果发生错误，会返回对应的错误码。 |
| message | 返回信息 | String | 返回信息，正确请参照示例。接口请求发生错误时的详细信息参照错误码说明。 |
| messageArgs | 返回信息参数 | List | 目前为空值，作扩展用途。 |
| data | 数据字典 | dict | 传回信息的字典。 |


#### 错误码


**表2 错误码说明**

| 错误场景 | 返回代码 | 错误信息 |
| --- | --- | --- |
| client\_id缺失 | 8101 | 缺少参数client\_id |
| authorization\_code缺失 | 8102 | 缺少参数authorization\_code |
| grant\_type缺失 | 8103 | 缺少参数grant\_type |
| client\_secret缺失 | 8104 | 缺少参数client\_secret |
| redirect\_uri缺失 | 8107 | 缺少参数redirect\_uri |
| client\_id无效 | 8201 | 参数client\_id非法 |
| authorization\_code无效 | 8202 | 参数authorization\_code非法 |
| grant\_type无效 | 8203 | 参数grant\_type非法 |
| client\_secret无效 | 8204 | 参数client\_secret非法 |
| redirect\_uri无效 | 8207 | 参数redirect\_uri非法 |
