获取授权码
授权码接口,需要在MulitMarket白标客户端下有用户授权三方系统获取授权码Code,用户同意后,返回Code给三方平台,三方平台根据appId、appSecret、code信息通过调用后端接口获取访问用户信息的有效访问令牌,最后根据此令牌可以获取用户基本信息,并进行授权绑定。 步骤: 1、打开授权页面获取授权码 https://www.headline.net/en-US/auth2/code?appId=088b591f5fd735be62608a272f4d971f&thirdAppType=HG&url=https%3A%2F%2Fwww.hg.com%2Flogin 以上授权确认后会跳转至 https://www.hg.com/login?code=********&app=headline
2、三方平台通过授权码换取访问令牌 通过获取code,后台调用接口换取 accessToken
3、根据访问令牌获取用户信息进行账号绑定 三方平台后台根据accessToken获取用户信息
Header parameters
tracestringRequiredExample:
{{mock_trace}}
tokenstringRequiredExample:
{{Token}}
companystringRequiredExample:
{{company}}
Body
appIdstringRequired
thirdAppTypestringRequired
Responses
200
成功
application/json
Responseobject
post
POST /cats-gateway-auth2/auth2/code HTTP/1.1
Host: prepc-real.headline.net
trace: text
token: text
company: text
Content-Type: application/json
Accept: */*
Content-Length: 68
{
"appId": "088b591f5fd735be62608a272f4d971f",
"thirdAppType": "mall-x"
}
200
成功
{
"bizCode": "",
"code": "0",
"msg": "Success",
"tm": 0,
"trace": "",
"msgParams": null,
"data": "f25bcfc4-0b0c-48ac-adab-ef45714d9543",
"ok": true,
"fail": false
}
Last updated