Skip to content

2. Third Party APP Login Process

Fred Liang edited this page Aug 13, 2018 · 1 revision

2.1 Action1

Via doc https://work.weixin.qq.com/api/doc#10719

Request URL :

https://open.work.weixin.qq.com/wwopen/sso/qrConnect

Urlencode Parameters:

Parameter Required Instruction
appid yes Work Weixin CorpID
agentid yes Agent ID: 1000011
redirect_uri yes Redirect URL: https://open.hustunique.com/auth (urlencoded)
state no urlsafe base64 encoded json data string

Json data string:

{
    "url":"your callback url",
    "token":"the token you got"
}

2.2 Action2

Redirect URL :your callback url

Redirect Urlencode Parameters:

Parameter Instruction
state urlsafe base64 encoded user info
timestamp timestamp, example: 1423361979

User info:

{
    "UserId":"TheUserUniqueID",
    "username":"username",
    "appid":"appid",
    "err":null,
    "phone":"17371266666",
    "state":"statedata"
}

Clone this wiki locally