简要描述:

  • 使用从平台获取的Auth_Ticket和Auth_Code,通过HttpPost方式,获取token,接口会返回以json文本的形式返回相应的值。

请求URL:

  • /api/shop/auth/access_ token

请求方式:

  • GET
  • POST

请求参数:

参数名称 类型 必选 长度 接口介绍
app_id String Y 32 app_id 和app_secret (由平台运维人员提供)
timestamp String Y 10 当前时间戳
sign String Y 32 表示签名规则:
timestamp去掉后两位后拼接
app_id+app_secret +auth_code + auth_ticket +timestamp
将上面字符串MD5 加密。

返回示例:

正确时返回:

{
    "status": true,
    "code": "200",
    "msg": "获取成功",
    "result": {
        "time": 1582606057,
        "expire_in": 108000,
        "token": "17ce976bb56dd9967322a7f641cda04e"
    }
}

错误时返回:

{
    "status": false,
    "code": "3003",
    "msg": "非法请求",
    "result": []
}

返回参数说明:

参数名称 类型 说明
time int 当前服务器时间
expire_in int 多少秒后过期
token string 平台访问授权token

备注:

  • 更多返回错误代码请看首页的错误代码描述
文档更新时间: 2023-04-11 10:15   作者:qiushiyong