用户token

此接口获取用户token,此用户token可以调用相应的业务接口以便作为用户代理进行相应的业务处理

检查用户token是否有效

Query参数
Name Documentation TypeName
access_token 用户授权access_token string
返回值
  • true 有效
  • false 无效

获取用户token-全局token

请求方式 POST 参数:

Query参数

Name Documentation TypeName
userid string

返回:

Name Annotations Documentation TypeName
access_token [] access_token string
expires_in [] access_token的生效时长(秒) integer

示例

返回

{
  "access_token": "secret",
  "expires_in": 7200
}

获取用户token-密码方式

请求方式 POST 参数:

Name Documentation typeName
appId 第三方应用ID integer
userId 已与第三方应用关联的用户ID string
password 第三方应用的用户密码 string
fromOwnTp 是否是自建第三方网站 boolean

返回:

Name Annotations Documentation TypeName
access_token [] access_token string
expires_in [] access_token的生效时长(秒) integer

示例 请求

返回示例

{
  "appid": 1,
  "userid": "sample string 2",
  "password": "sample string 3",
  "own_tp": true
}

返回

{
  "access_token": "secret",
  "expires_in": 7200
}