Skip to content
On this page

3.1 获取Access Token

接口说明:

MethodURLContentType
GET/api/restful/auth2/access_tokenapplication/json

URL参数说明

参数类型说明是否必须描述
timestampstring必须当前调用时间,格式为"yyyyMMdd”,如:20171106
usernamestring必须提供给第三方的用户名
signstring必须签名规则:username+password+timestamp+password,将上面字符串MD5、32位加密后转为小写

返回结果说明:

参数类型说明描述
access_tokenstringToken
expires_atdatetime过期时间
refresh_tokenstrin刷新token
refresh_expires_atdatetime过期时间

请求参数示例:

/api/restful/auth2/access_token?username=colipu&timestamp=20171106&sign=085b207da7a3c853f3c4c2e0764dbbca

返回数据示例:

json
{
    "result": {
        "access_token": "fd35041c94334fab85905dc27342f85b",
        "expires_at": "2019-04-29 14:40:36",
        "refresh_token": "241704df96f84a3cabf68a26c6a04ae3",
        "refresh_expires_at": "2019-04-30 14:40:36"
    },
    "success": true,
    "errormsg": "",
    "errorcode": "0",
    "requestId": "cf1e1756b1454b8ea9d4ee1dbf87a4ba"
}