简要描述:

  • 使用平台分配的app_id和app_secret,通过HttpPost方式,获取授权码,接口会以json文本的形式返回相应的值。
  • 3小时内调用一次

请求URL:

  • /api/shop/auth/access_code

请求方式:

  • GET
  • POST

请求参数:

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

返回示例:

正确时返回:

{
    "status": true,
    "code": "200",
    "msg": "获取成功",
    "result": {
        "time": 1582605915,
        "expire_in": 108000,
        "auth_code": "f298f591e7995602c5800b757cd693d0"
    }

错误时返回:

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

返回参数说明:

参数名 类型 说明
time int 当前服务器时间
expire_in int 多少秒后过期
auth_code string auth_code

备注:

  • 更多返回错误代码请看首页的错误代码描述
文档更新时间: 2020-03-26 11:36   作者:管理员