跳转至

令牌查询

功能说明

根据access_tokenappid获取access_token的详细信息,此接口调用次数限制为60次/分钟

接口地址

HTTP请求方式

  • Method: POST
  • Content-Type: application/x-www-form-urlencoded

参数说明

  • 公有参数

    发送请求时必须传入公共参数,详见公共参数

  • 私有参数

参数名称 是否必须 参数类型 长度限制 描述
appid string [32] appid,由关爱通分配,唯一。
grant_type string [17] 固定为client_credential

请求示例

POST /token/getTokenInfo HTTP/1.1
Host: openapi.guanaitong.tech
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache

access_token=cde2c369fab499c0bf0643bb1844e70c&appid=30000003&sign=ca884a9e28e31580b11bbf1a46a5e3adb0823d70&
timestamp=1494314043

返回参数说明

参数名称 描述
code 返回码。详见错误返回码
msg 如果错误,返回错误信息。
data 如果没有错误,返回业务数据
data.access_token token生成接口生成的token
data.expires_in token的有效时长,单位:s(秒)

正确返回示例

{
    "code": 0,
    "data": {
        "access_token": "cde2c369fab499c0bf0643bb1844e70c",
        "expires_in": 3600
    },
    "msg": "OK"
}

错误返回示例

{
    "code": 1000210003,
    "data": null,
    "msg": "appinfo check failed!"
}
回到页面顶部