01/10/2025 10:53:00
Login Authentication
I. Authentication
1.1 Interface name
/v2/auth/verify_login
1.2 Request Parameters
Parameter | Type | Description |
---|---|---|
openid | string | [Required] openid |
token | string | [Required] token |
1.3 Return Parameters
Parameter | Type | Description |
---|---|---|
ret | int | return code 0: correct, others: failure |
msg | string | The detailed description of the return result |
1.4 Request example
- Request:
{
"openid": "3042973086530817307",
"token": "11_VXv3tGoYKnhpJlwnlvb9c6BHSjjcMv5skSBtrlVskheyLZphb4WCd9bigS-uNqT9OZiXXeB9aCWuJ4SAU20fBLe-2odm7QZALwIdy5u1ZQw"
}
- Return:
{
"ret":0,
"msg": "user is logged in.",
"seq": "123"
}
Warning:
1.For PC SDK-based authorization, it is needed to add "client_os":5 in the json body. The details are as follows:
{
"openid":"14100430050145592702",
"token":"cfidt26Wg-QDc5PoDqglJxzOrw9H0hmTn0At4nK3lAP5vpvPAl1AxHMzvHM89tN6u5v9pmns8ZcCYU3f1DBBheHnVYYo940MXs5rXZpZ8S4loYpoRdaXmDhT2zPFYsDD0a9IrQdrHbzAu7IGz4MGAGuMs8y1p10PMyJpDkEa7tRm8wngXuoHFA",
"client_os":5
}
2.The token obtained through PC Web-based authorization has the same type as that obtained through mobile game authorization. When performing server authentication, the access party must confirm that in json body, there is no need to additionally pass "client_os":5 and 5 is not passed into the
os
field in Request URL; otherwise, the authentication will fail.
II. Decryption check
2.1 Interface name(The interface is a GET request)
/v2/auth/decrypt
2.2 Request Parameters
Parameter | Type | Description |
---|---|---|
itopencodeparam | string | [Required] encrypted string |
2.3 Return Parameters
In case of success, return the plaintext after itopencodeparam is decrypted; in case of failure, return a JSON string. The field is as follows.
Parameter | Type | Description | example |
---|---|---|---|
ret | int | return code 0: success, other: failure | 0 |
msg | string | if ret is not 0, return the detailed error information | " decryp data fail!" |
seq | string | seq field in request url | " 12345" |
2.4 Request example
- Request URL
- Response
acctype=qq&appid=100703379&openid=4FC5813635C21D7C0A64729E4E2D3041&access_token=B85D2A1D7DB1B564CADE7116BF70AD0D&platid=1
III. Get pf and pfkey
3.1 Interface name
/v2/auth/get_pfval
3.2 Request parameters
Parameter | Type | Description |
---|---|---|
openid | string | [Required] openid |
token/pay_token | string | [Required] QQ login requires pay_token; other login channels require token |
channel_dis | string | [Required] Distribution channel |
3.3 Return parameters
Parameter | Type | Description |
---|---|---|
ret | int | Return code: 0: success, others: failure |
msg | string | Detailed description of the return result |
pf | string | Corresponding pf value |
pf_key | string | Corresponding pfKey value |
3.4 Request example
- Request:
{
"channel_dis":"TEST",
"openid":"11446279220371186239",
"pay_token":"396A1198D087D987641CD8F6EFFE7D68"
}
- Return:
{
"ret":0,
"msg":"success",
"pf":"qq_qq-TEST-android-TEST-qq-1106977030-F759BCD85FDB760A18BABC3A37DF5F6A",
"pf_key":"3f80bb2980d50e1b7c785d9197c32a83"
}
Copyright © 2025 MSDK.
All rights reserved.
All rights reserved.