# 判断openId是否合法
接口地址:http://gateway--cnki--net--https.cnki.mdjsf.utuvpn.utuedu.com:9000/openx/jssdk/auth/openId/check?openId=ea08
请求方式:GET
接口描述: 判断openId
是否合法
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 |
---|---|---|---|---|
openId | 用户openId | query | true | String |
Authorization | 请求的token,获取方式详见:知网研学开放平台文档-认证中心-客户端模式获取JWT (opens new window) | header | true | String |
注意事项:Authorization
参数是携带在请求的header
中,格式示例(注意Bearer 后有空格):
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCaWF...
响应状态:
状态码 | 说明 |
---|---|
200 | OK |
400400 | 无效的请求! |
400430 | 权限不足,拒绝访问! |
400511 | 无效的openId! |
400512 | 参数异常,请检查入参! |
400500 | 系统异常,请联系管理员! |
响应参数:
参数名称 | 参数说明 | 类型 |
---|---|---|
code | 接口返回状态码 | integer(int32) |
content | 接口返回数据 | object |
count | 接口返回当前页数据条数(分页查询专用) | integer(int32) |
message | 接口返回信息 | string |
success | 接口返回是否成功 | boolean |
total | 接口返回数据总条数(分页查询专用) | integer(int32) |
响应示例:
{
"success": true,
"message": "合法用户",
"content": "1",
"count": null,
"total": null,
"code": 200
}
注意:code
=200,content
="1"可作为判断openId
合法性的依据。