获取App Token

接口地址:

/auth/token

请求方式:POST

请求头:

参数名参数值
Content-Typeapplication/json; charset=UTF-8

请求参数:

参数名参数值描述
app_keystringAppKey
app_keystringAppKey

响应结果:

参数名参数值是否一定回传描述
err_codeint状态码,详见状态码表
msgstring描述信息
resultstring(JSON)否,code为200回传结果(结果集)
result结果集(code=200回传):
参数名参数值是否一定回传描述
access_tokenstringToken值
token_typestring鉴权方式
remarksstring备注
expires_inintToken有效期

响应示例:

成功:
{
	"code": 200,
	"msg": "Success",
	"result": {
		"access_token": "M1puImxeen2x1VucR3GRvXIDaXht5A3lG1wAoW9o0ixmGCKb2-QoCJFWnCHuwFhz",
		"token_type": "Bearer ",
		"remarks": "http请求头 Authorization: Bearer “access_token值”,Bearer后面有一个空格",
		"expires_in": 7200
	}
}
失败:
{
	"code": 401,
	"msg": "Invalid app_key or app_secret"
}