# 根据Token获取用户信息
接口地址:http://gateway--cnki--net--https.cnki.mdjsf.utuvpn.utuedu.com:9000/openx/jssdk/auth/v1/user
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:*/*
接口描述:
根据Token获取用户信息
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 |
|---|---|---|---|---|
| Authorization | 请求的token,获取方式详见:知网研学开放平台文档-认证中心-授权码模式获取JWT (opens new window) | header | true | string |
注意事项:Authorization参数是携带在请求的header中,格式示例(注意Bearer 后有空格):
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCaWF...
响应状态**:
| 状态码 | 说明 |
|---|---|
| 200 | 成功 |
| 400500 | 服务器繁忙,请稍后再试! |
| 400608 | 用户不存在! |
| 400518 | 无效的openId! |
响应参数:
| 参数名称 | 参数说明 | 类型 |
|---|---|---|
| code | 接口返回状态码 | integer(int32) |
| content | 接口返回数据 | 用户信息 |
| nickName | 用户昵称 | string |
| openId | 用户在开放平台的标识 | string |
| userName | 用户名称 | string |
| count | 接口返回数据条数,用于分页查询 | integer(int32) |
| message | 接口返回信息 | string |
| success | 接口返回是否成功 | boolean |
| total | 接口返回数据条数,用于分页查询 | integer(int32) |
响应示例:
{
"code": 0,
"content": {
"nickName": "",
"openId": "",
"userName": ""
},
"count": 0,
"message": "",
"success": true,
"total": 0
}