MSDK Sever interface
General
Login
Outline
QQ authentication[Required]
WeChat authentication[Required]
Guset authentication[Required]
Apple authentication[Required]
Get pf and pfkey
Relation
[QQ]User information
[QQ]Friends information
[QQ]Friends information(unreg)
[QQ]Game information
[QQ]member information
[QQ]Member details
[QQ] Union binding group
[QQ]Group relation query
[QQ] Join group
[QQ]Unbound the group
[QQ]Get group list v2
[QQ]Bind qqgroups v2
[QQ]Remind the president to bind group v2
[QQ]Query group-bound union v2
[QQ]Get group info
[QQ]Send group message
[WeChat]Friends openid
[WeChat]Game friends info
[WeChat]Game friends info(with remarks)
[WeChat]Personal information
[WeChat]Group member information
[WeChat]Unbind group
[WeChat]Query group state
[WeChat]Send group messages
Profile
[QQ]First realname info
[QQ]Get VIP information
[WeChat ]Get privilege
[QQ]Blue diamond gift pack
[QQ]Wifi qualification
[QQ] Report the achievements
[WeChat]Reporting of achievements
[WeChat]Message subscription
[WeChat] Batch subscription
[WeChat]Subscription push
[WeChat]Clear subscription
[WeChat]Elite query
[QQ]First realname info
[QQ]Get Xinyue vip
[WeChat]Get Xinyue vip
[WeChat]First realname info
Share
[QQ]Backend share
[QQ]ark backend share
Free flow
Query free flow
Inquire IP info
Error Code
MSDK access layer
MSDK logical layer
Mobile QQ platform
WeChat platform
WeChat Group
QQ Group
Mobile QQ game center
Mobile QQ sharing-related
Mobile QQ blue diamond gift big
OIDB
Get Xinyue Super R
[WeChat]Get Xinyue Super R
MSDK Sever interface / Login / Outline

General description

1)msdk backend provides http/https interface protocol and post request;
2)In the request url, there are fixed get parameters, including appid, sig, timestamp, encode, etc.;
3)body part is json string;
4)All parameters in the interface are utf8 encoding;
5)The background interface timeout period is 3100ms;

1. Environment

Environment intranet extranet
Test http://msdktest.tencent-cloud.net https://ap6msdktest.ssl.msdk.qq.com (Android)
https://ip6msdktest.ssl.msdk.qq.com (iOS)
Formal http://msdk.tencent-cloud.net https://ap6.ssl.msdk.qq.com (Android)
https://ip6.ssl.msdk.qq.com (ios)

2.Parameter

1)Fixed get parameters:
Form:

http://msdk.qq.com/modulename/interfacename?timestamp=x3&appid=x4&sig=x5&openid=x6&encode=x7&version=x8&ishttps=x9

modulename: function classification;
interfacename: interface name;
Pay attention to each interface's detailed description;

Parameter name Type Description
timestamp uint timestamp 【required】
appid string game appid (Mobile QQ or WeChat) 【required】
sig string lowercase string with a length of 32 characters; for the algorithm, see sig generation rules; 【Required】
openid string User account, defaulted to null
encode string generate sig configuration item encode=2, and use msdkkey to generate sig (encode=1, use appkey to generate sig, not recommended in current version); 【Required】
conn int indicate whether to use a long connection or not; conn=1 indicates long connection, and the default value is 0;
msdkExtInfo string indicate passthrough parameter, which will be carried in the returned json. Note: no special character in msdkExtInfo, which shall be only composed of English letters, figures and underlines, and is defaulted to null;
version string indicate the carried MSDK version, and the default value is null (carried at the client's call);
ishttps int the strategy for being compatible with https, 1: the returned body parameter url request is https, 0 or null: the returned body parameter url request is http;

2)http body(post)
body is text string in json format, and it is defaulted to plain text. If the http header is set as the value below, it indicates cryptograph (including returned packet):

Content-Encrypt=msdktea;![](guild)
Accept-Encrypt=msdktea;


3)sig generation rule
If encode=1 : sig = md5 ( appkey + timestamp )
If encode=2 :sig = md5 ( msdkkey+ timestamp )
+ indicates the connection of two strings, non-string"+";

4) https compatibility
At present, MSDK's returned avatar link supports https, and the two mode are optional: carry version=2.16.0i(or above) or ishttps=1 (recommended) in the GET request

3.result

After sending data through http protocol, get the status code. If the value is 200, it implies the request is normal, that is, the content returned from http can be got, and json string can be parsed into array. If the value is not 200, it indicates request failure. Then, directly print the result to check the problem.

4. Example (php)

<?php
require_once 'SnsNetwork.php';
$appid = "100703379";
$appKey = "f92212f75cd*********";
$openid = "F4382318AFBBD94F856E8%2066043C3472E";
$ts = time();
//md5 32-bit lower case, for example, md5 of "111111" is "96e79218965e*********d5a330112";
$sig = md5($appKey.$ts);
$url= "http://msdktest.qq.com/relation/qqfriends_detail?timestamp=$ts&appid=$appid&sig=$sig&openid=$openid&encode=1";
$param = array(
    "appid"=> 100703379,
    "openid"=>"A3284A812ECA15269F85AE1C2D94EB37",
    "accessToken"=>"933FE8C9AB9C585D7EABD04373B7155F"
);
$result = SnsNetwork::makeRequest($url,json_encode($param));
print_r($result);

login

Caution: All login interfaces' function classification names auth and wxoauth are of the same effect, and they can be interchanged;

Outline

General login workflow:

Server-side authentication part is login's key path, and the game needs the game's backend to complete it;

Mobile QQ authentication[Required]

1) interface name:/auth/verify_login
2) Interface description: verify the user's login state, and check if the access_token expires. If url carries msdkExtInfo=xxx(request serial number), the raw data of msdkExtInfo can be returned in the subsequent content, so as to realize the pure exception request. msdkExtInfo is an optional parameter.
3) URL Format:
 

http://msdktest.qq.com/auth/verify_login?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid int App's unique ID in the QQ open platform
openid string An ordinary user's unique identifier(QQ platform)
openkey string Authorization certificate, namely, access_token
userip string The user's client ip

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
msg string if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description

6) Example:

POST /auth/verify_login?timestamp=1478745715&appid=100703379&sig=3f046b1cdd74e44f2832c1000e11119f&openid=A3284A812ECA15269F85AE1C2D94EB37&encode=2 
HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 198

{
    "appid": 100703379,
    "openid": "A3284A812ECA15269F85AE1C2D94EB37",
    "openkey": "933FE8C9AB9C585D7EABD04373B7155F",
    "userip": "192.168.5.114"
}

//return result:
{"ret":0,"msg":"user is logged in"}

WeChat authentication[Required]

1) interface name:/auth/check_token
2) Interface description: WeChat checks if the authorization certificate (access_token) is effective.
If url carries msdkExtInfo=xxx(request serial number), the raw data of msdkExtInfo can be returned in the subsequent content, so as to realize the pure exception request. msdkExtInfo is an optional parameter.
3) URL Format:

http://msdktest.qq.com/auth/check_token?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
openid string The user's unique ID in the game
accessToken string login state

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
msg string if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description

6) Example:

POST /auth/check_token?timestamp=1478745715&appid=100703379&sig=3f046b1cdd74e44f2832c1000e11119f&openid=oGRTijiaT-XrbyXKozckdNHFgPyc&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 198

{
    "accessToken": "OezXcEiiBSKSxW0eoylIeLl3C6OgXeyrDnhDI73sCBJPLafWudG-idTVMbKesBkhBO_ZxFWN4zlXCpCHpYcrXNG6Vs-cocorhdT5Czj_23QF6D1qH8MCldg0BSMdEUnsaWcFH083zgWJcl_goeBUSQ",
    "openid": "oGRTijiaT-XrbyXKozckdNHFgPyc"
}

//return result
{"ret":0,"msg":"ok"}

Guest authentication[Required]

1) interface name:/auth/guest_check_token
2) Interface description: In the guest mode, call this interface for authentication.
3) URL Format:

http://msdktest.qq.com/auth/guest_check_token?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
guestid string A guest's unique identification
accessToken string login state

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
msg string if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description

6) Example:

POST /auth/guest_check_token?timestamp=1478745715&appid=G_100703379&sig=3f046b1cdd74e44f2832c1000e11119f&openid=G_oGRTijiaT-XrbyXKozckdNHFgPyc&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 198

{
    "accessToken": "OezXcEiiBSKSxW0eoylIeLl3C6OgXeyrDnhDI73sCBJPLafWudG-idTVMbKesBkhBO_ZxFWN4zlXCpCHpYcrXNG6Vs-cocorhdT5Czj_23QF6D1qH8MCldg0BSMdEUnsaWcFH083zgWJcl_goeBUSQ",
    "guestid": "G_oGRTijiaT-XrbyXKozckdNHFgPyc"
}

//return result
{"ret":0,"msg":"ok"}

Apple authentication[Required]

1)interface name:/auth/apple_verify
2)Interface description:verify the user's login state, and check if the access_token expires.
3)URL Format:

http://msdktest.qq.com/auth/apple_verify?timestamp=&appid=&sig=&openid=&encode=2 

4)Parameter description:

Parameter name Parameter name Description
appid string The unique identifier of APP, fill it in as A_QQappid, such as: A_100703379 [Required]
channel string Public parameters, generally fill in 1001
deviceInfo object Public parameters
os string System, ios fill in iap
platform string Platform, fixed as apple_apple [Required]
user_name string username
openid string The unique ID of the user [Required]
access_token string Login access_token [Required]
scenes int Login scene, fixed to 1
isPrajna string Real-name related parameters, fixed to 1

5)Return explanation:

Parameter name Type Description
ret int return code 0:correct, others: failure
msg string if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description

6)Example:

POST /auth/apple_verify/?timestamp=xx&appid=xx&sig=xx&openid=xx&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded

{
    "appid":"A_100703379",
    "channel":"1001",
    "deviceInfo":{"apkSize":"","mid":"F78A9942-A5F2-BF44820","deviceResolution":"828*1792","deviceApn":"WiFi","deviceTradeMark":"iPhone11","osVersion":"13.1.3","deviceImei":"3331B4AF3157","apkName":"","deviceName":"qinghe(UKiPhone","appVersion":"3.3.12u","osSystem":"ios","localIP":"10.2.46.93","apkVersion":""},
    "os":"iap",
    "platform":"apple_apple",
    "scenes":1,
    "isPrajna":"1",
    "user_name":"",
    "openid":"001397.7ff24f921687e60de.0342",
    "access_token":"a8056b8b672b6bb8de46.0.mrtzx.ArFaahPSGpcw"
}

//return result
{"ret":0,"msg":"success"}

Get pf and pfkey

1) interface name:/auth/get_pfval
2) Interface description: Get pf and pfkey values ​​by passing in parameters.
3) URL Format:

http://msdktest.qq.com/auth/get_pfval?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string unique identifier of the game
openid string the user's unique identifier
accessToken string login state (QQ uses paytoken; WeChat uses accesstoken)
platform string platform identifier (under normal circumstances: QQ's corresponding value is desktop_m_qq, WeChat's corresponding value is desktop_m_wx, and Guest's corresponding value is desktop_m_guest)
regChannel string Registration channel
os string System (Android corresponds to android, and iOS corresponds to iap)
installchannel string installation channel
offerid string payment's appid

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
msg string if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
pf string corresponding pf value
pfKey string corresponding pfKey value

6) Example:

POST /auth/get_pfval/?timestamp=1491527653&appid=wxcde873f99466f74a&sig=161bb45ba800811d1220ab24acfbc83b&version=3.0.0a&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 198

{
    "appid":"wxcde873f99466f74a",
    "openid":"oyQmcwlfqLdebciSJTiGy8Bm5N40",
    "accessToken":"u2OLuoBXgeJpL206s4Y6l1gb6vQDpL6dopCN9VGTUv7GRjUvxgxXT78Mxj-1SdYeRUObVB1FFbugXCpwYG_EPyKy0-HEnu6d861OB-xoVA8",
    "platform":"desktop_m_wx",
    "regChannel":"2002",
    "os":"android",
    "installchannel":"73213123",
    "offerid":"1104674695"
}

//return result
{
    "pf": "desktop_m_wx-2002-android-73213123-wx-wxcde873f99466f74a-oyQmcwlfqLdebciSJTiGy8Bm5N40",
    "pfKey": "60de2c996**********9a81f8ccb0",
    "msg": "ok",
    "ret": 0
}

Relation chain

[Mobile QQ]User information

1) interface name:/relation/qqprofile
2) Interface description: Get user QQ account's basic information.
3) URL Format:

http://msdktest.qq.com/relation/qqprofile?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string The user's unique identification
accessToken string login state

5) Return explanation:

Parameter name Type Description
ret int return code  0:correct,others:failure
msg string If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
nickName string The user's nickname in QZone (sync with mobile QQ nickname)
gender string gender; QQ platform will return "male" by default from October 27, 2021 to January 1, 2022; after January 1, 2022, the platform will not return anything
picture40 string URL of QQ avatar with a size of 40×40 pixels
picture100 string URL of QQ avatar with a size of 100×100 pixels. It is worth noting that not all users have a QQ avatar of 100x100 and they must have an avatar of 40x40 pixels
yellow_vip int Check if the user is Yellow Diamond user, and 0 indicates no Yellow Diamond
yellow_vip_level int Yellow Diamond level
yellow_year_vip int Check if the user is Yellow Diamond user who pays annual membership fees, and 0 indicates no
is_lost string is_lost is 1, indicating the got data is subjected to degrading treatment: if the service layer has cache data, use the cache data at first;
If there is no cache data, use the current data. If is_lost is 1, do not cache the data
6) Example:
POST /relation/qqprofile/?timestamp=*&appid=**&sig=***&openid=**&encode=1 HTTP/1.0
Host:$domain
Content-Type: application/x-www-form-urlencoded
Content-Length: 198

{
    "appid": "100703379",
    "accessToken": "FCCDE5C8CDAD70A9A0E229C367E03178",
    "openid": "69FF99F3B17436F2F6621FA158B30549"
}

//return result
{
    "ret": 0,
    "msg": "success",
    "nickName": "xxx",
    "gender": "Male",//gender; QQ platform will return "male" by default from October 27, 2021 to January 1, 2022; after January 1, 2022, the platform will not return anything
    "picture40": "http://q.qlogo.cn/qqapp/100703379/A3284A812ECA15269F85AE1C2D94EB37/40",
    "picture100": "http://q.qlogo.cn/qqapp/100703379/A3284A812ECA15269F85AE1C2D94EB37/100",
    "yellow_vip": 0,
    "yellow_vip_level": 0,
    "yellow_year_vip": 0,
    "is_lost": "0"
}

[Mobile QQ]Game friends

1) interface name:/relation/qqfriends_detail
2) Interface description: an interface used to get QQ game friend's detailed personal information.
3) URL Format:

http://msdktest.qq.com/relation/qqfriends_detail?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string The user's unique identification
accessToken string login state
flag int flag=1, return the friend relation chain excluding the user; flag=2, return the friend relation chain including the user. Other values are invalid, and the current logic is used
closefriends_flag int Whether or not to return a close friend; the default value is empty or 0 and means No; 1 represents Yes

5) Return explanation:

Parameter name Type Description
ret int return code  0:correct,others:failure
msg string If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
lists array QQ game friend personal information list, type vector
is_lost string is_lost is 0, indicating that the friend data returned by mobile QQ is normal; if it is 1, the obtained data has been downgraded, and the business can evaluate whether to use the data when it is 1
extinfo object the corresponding data json object
closefriend_lists array The returned data list
struct QQGameFriendsList {
    string          openid;      //a friend's openid
    string          nickName;   //nickname (output remarks at first; nickname is output if no remarks)
    string          gender;      //gender; QQ platform will return "male" by default from October 27, 2021 to January 1, 2022; after January 1, 2022, the platform will not return anything
    string          figureurl_qq;  //a friend's QQ avatar URL; add the following parameters behind URL;  /40, /100 so as to obtain pictures of different specifications, respectively:
  40*40(/40)、100*100(/100)
};

6) Example:

POST /relation/qqfriends_detail/?timestamp=1381288134&appid=100703379&sig=3f308f92212f75cd8d682215cb3fa852&openid=F4382318AFBBD94F856E8%2066043C3472E&encode=1

{
    "appid": “100703379”,
    "openid": "A3284A812ECA15269F85AE1C2D94EB37",
    "accessToken": "933FE8C9AB9C585D7EABD04373B7155F",
    "flag": 1,
    "closefriends_flag": 1
}
//return result
{
    "ret": 0,
    "msg": "success",
    "lists": [
    {
        "openid": "69FF99F3B17436F2F6621FA158B30549",
        "nickName": "xxx",
        "gender": "",
        "figureurl_qq": "http://q.qlogo.cn/qqapp/100703379/69FF99F3B17436F2F6621FA158B30549/"
    }
    ],
    “extinfo”:{
        "closefriend_lists" : [
            "DB8830DFD91050D6BD9CFAC29121C98B", 
            "DB8830DFD91050D6BD9CFAC29121C98B"
        ]
    },
    "is_lost": "0"
}

[mobile QQ]Friend's info(not register this app)

1) interface name:/relation/qq_unreg_friends
2) Interface description: Get the information of friends not registered the app from the mobile QQ friend list.
Note: Acquiring unregistered friend information is based on the score reporting interface of the game. Those which don’t access the score reporting interface (interface: /profile/qqscore_batch) are not allowed to call the interface

When this interface is called in the game, it will obtain unauthorized user data. It must be modified after the evaluation of the "Personal Information Protection Law". The business that has been connected should be paid attention to, and the business that has not been connected should be suspended.

Platform side transformation plan: Starting from 2021.11.05, calling this interface will return empty data of "no recommended friends", please pay attention to the user interface processing, and hide the ability entry if necessary.

3) URL Format:

http://msdktest.qq.com/relation/qq_unreg_friends?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
accessToken string login state
count int the number of friends expected to be drawn; not more than 20; it is recommended to use 20

5) Return explanation:

Parameter name Type Description
ret int return code  0:correct,others:failure
msg string If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
friends array friend list; type: vector
struct QQUnregFriendsList {
    string          openid;       //a friend's openid
    string          nick_name;    //friend's nickname (the returned is QQ nickname, do not return a note)
    string          head_img_url; //friend's avatar
};

6) Example:

POST /relation/qq_unreg_friends/?timestamp=1381288134&appid=100703379&sig=3f308f92212f75cd8d682215cb3fa852&openid=F4382318AFBBD94F856E8%2066043C3472E&encode=2

{
    "accessToken": "933FE8C9AB9C585D7EABD04373B7155F",
    "count": 20
}
//return result
{
    "ret": 0,
    "msg": "success",
    "friends": [
    {
        "openid": "67063124582BE5086B203F543E4F643C",
        "nick_name": "xxx",
        "head_img_url": "http://thirdqq.qlogo.cn/qqapp/1104466820/67063124582BE5086B203F543E4F643C/100"
    }
    ]
}

[Mobile QQ]Friends information

1) interface name:/relation/qqstrange_profile
2) Interface description: Get the personal information of game strangers(including game friends), who are other players playing the same game with the player.
PS: 1. This interface is currently only available to games which have developed "Nearby persons" and other functions
2. Only after the game stranger openid list has been got at the client end, can this interface be called


3) URL Format:

http://msdktest.qq.com/relation/qqstrange_profile?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string The user's unique identification
accessToken string login state
vcopenid array the openid list of game strangers (including game friends) who need to be queried; for example: vcopenid:["${openid}","${openid1}"]

5) Return explanation:

Parameter name Type Description
ret int return code  0:correct,others:failure
msg string If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
list array the personal information list of QQ game strangers(including game friends); type: vector< QQStrangeList>
is_lost string is_lost is 0, indicating that the friend data returned by mobile QQ is normal; if it is 1, the obtained data has been downgraded, and the business can evaluate whether to use the data when it is 1
struct QQStrangeList {
    string          openid;          //openid
    string          gender;          //gender; QQ platform will return "male" by default from October 27, 2021 to January 1, 2022; after January 1, 2022, the platform will not return anything
    string          nickName;        //nickname
    string          qzonepicture50;  //URL of the friend's Qzone avatar with a szie of 50×50 pixels
    string          qqpicture40;     //URL of the friend's QQ avatar with a size of 40×40 pixels
    string          qqpicture100;    //URL of the friend's QQ avatar with a size of 100×100 pixels
    string          qqpicture;       //URL of the friend's QQ avatar with a size of adaptive pixels; add the following parameters behind URL: /40, /100, so as to obtain pictures of different specifications:40*40(/40)、100*100(/100)
}; 

6) Example:

POST /relation/qqstrange_profile/?timestamp=1381288134&appid=100703379&sig=3f308f92212f75cd8d682215cb3fa***&openid=F4382318AFBBD94F856E8%2066043C3472E&encode=1

{
    "appid": 100732256,
    "openid": "B9EEA5EE1E99694146AC2700BFE6B88B",
    "accessToken": "C9A1F622B7B4AAC48D0AF3F73B1A3D83",
    "vcopenid": [
    "B9EEA5EE1E99694146AC2700BFE6B88B"
    ]
}
//return result
{
    "ret": 0,
    "msg": "success",
    "lists": [
    {
        "openid": "B9EEA5EE1E99694146AC2700BFE6B88B",
        "gender": "1",
        "nickName": "/xu゛♥Get into the bowlஇ",
        "qzonepicture50": "http://thirdapp1.qlogo.cn/qzopenapp/aff242e95d20fb902bedd93bb1dcd4c01ed5dc2a14b37510a81685c74529ab1e/50",
        "qqpicture40": "http://q.qlogo.cn/qqapp/100732256/B9EEA5EE1E99694146AC2700BFE6B88B/40",
        "qqpicture100": "http://q.qlogo.cn/qqapp/100732256/B9EEA5EE1E99694146AC2700BFE6B88B/100",
        "qqpicture": "http://q.qlogo.cn/qqapp/100732256/B9EEA5EE1E99694146AC2700BFE6B88B"
    }
   ],
   "is_lost": "0"
}

[Mobile QQ]Member information

1) interface name:/relation/qqfriends_vip
2) Interface description: query QQ member information in batch (support both friends and non-friends).
3) URL Format:

http://msdktest.qq.com/relation/qqfriends_vip?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string The user's unique identification
fopenids array the list of openid to be queried; not more than 49 pieces can be input each time
flags string VIP service query marker. Currently, it supports to query QQ member information:qq_vip, QQ super member: qq_svip. It will support more services' user VIP information query in the future. If several types of VIP services need to be queried, they should be separated with ",".
userip string the caller's ip information
pf string The player's login platform; openmobile by default; possible values include openmobile_android/openmobile_ios/openmobile_wp, etc. The value comes from the return of the cliend-end mobile QQ login
accessToken string login state

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
msg string if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
lists array including:
openid(string)user id
is_qq_vip(int) is QQ member?(0: Yes; 1: No)
qq_vip_level(int)QQ member level(return when the user is QQ member)
is_qq_year_vip(int)QQ member who pays annual membership fees (0: No; 1: Yes)
is_qq_svip(int)QQ super member? (0: No; 1: Yes)
is_lost string when is_lost is 1, it indicates that oidb gets data beyond the time limit. It is suggested that when the game service detects is_lost is 1, the data shall be subjected to degrade treatment, and cache data or default data should be directly read

6) Example:

POST /relation/qqfriends_vip?timestamp=1478745715&appid=100703379&sig=3f046b1cdd74e44f2832c1000e11119f&openid=A3284A812ECA15269F85AE1C2D94EB37&encode=2   HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 198

{
    "appid": "100703379",
    "openid": "A3284A812ECA15269F85AE1C2D94EB37",
    "accessToken": "964EE8FACFA24AE88AEEEEBD84028E19",
    "fopenids": [
        "69FF99F3B17436F2F6621FA158B30549"
    ],
    "flags": "qq_vip,qq_svip",
    "pf": "openmobile_android",
    "userip": "127.0.0.1"
}
//return result
{
    "is_lost": "0",
    "lists": [
        {
            "is_qq_vip": 1,
            "is_qq_year_vip": 1,
            "openid": "69FF99F3B17436F2F6621FA158B30549",
            "qq_vip_level": 6,
            "is_qq_svip": 1
        }
    ],
    "msg": "success",
    "ret": 0
}

[Mobile QQ]Member's detailed info

1) interface name:/relation/get_vip_rich_info
2) Interface description: query mobile QQ member's detailed information (recharge time & expiration time)
3) URL Format:

http://msdktest.qq.com/relation/get_vip_rich_info?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string a player's unique identification
accessToken string login state

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
msg string if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
is_lost string Check if there is data loss. If the application does not use cache, there is no need to care about this parameter. 0 or no return: no data loss, cache is an option. 1: partial data loss or error, no caching.
is_qq_vip string Mark if the play is a QQ member (0: No; 1: Yes)
qq_vip_start string QQ member's last recharge time, standard timestamp
qq_vip_end string QQ member duration, standard timestamp
qq_year_vip_start string QQ annual fee member's last recharge time, standard timestamp
qq_year_vip_end string QQ annual fee member's duration, standard timestamp
qq_svip_start string if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description; QQ SVIP's last recharge time, standard time stamp
qq_svip_end string QQ SVIP duration, standard timestamp
is_qq_year_vip string Mark if the play is a QQ annual fee member (0: No; 1: Yes)
is_svip string Mark if the play is a QQ super member (0: No; 1: Yes)

6) Example:

POST /relation/get_vip_rich_info?timestamp=1381288134&appid=100703379&sig=3f308f92212f75cd8d682215cb3fa8&openid=F4382318AFBBD94F856E866043C3472E&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 134

{
    "appid": "100703379",
    "accessToken": "E16A9965C446956D89303747C632C27B",
    "openid": "F4382318AFBBD94F856E866043C3472E"
}

//return result
{
    "is_lost": "0",
    "is_qq_vip": "0",
    "msg": "success",
    "qq_svip_end": "0",
    "qq_svip_start": "0",
    "qq_vip_end": "1448817920",
    "qq_vip_start": "1443461120",
    "qq_year_vip_end": "0",
    "qq_year_vip_start": "0",
    "ret": 0,
    "is_qq_year_vip":"1",
    "is_svip":"1"
}

[Mobile QQ]guild binding group

1) interface name:/relation/createbind_groupv2
2) Interface description: guild president creates and directly binds QQ group interface (new) (need to apply for permission for using it)
3) URL Format:

http://msdktest.qq.com/relation/createbind_groupv2?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string a player's unique identification
accessToken string login state
guild_id string guild ID
zone_id string zone server id
guild_name string guild or guild name
platid string platform id (1: Android 2: ios)
roleid string Role id
partition string (zone)zone server id, which may be left blank, and no use for now
user_zone_id string (new; allow to be left blank) the user's zone server ID; the president of the King of Glory guild may transfer it to a person who doesn't belong to this zone server,
so the guild's zone server is not necessarily the user's zone server. if the ID is the same as that of the guild zone server, it can be left blank
user_label string (new; allow to be left blank) add the function of modifying the group's business card; being totally blank means not to modify the group's business card; being not blank means to modify it;
style rule: 【YYYY】ZZZZ, where ZZZZ refers to the user's nickname within the game
nick_name string (new; allow to be left blank) the user's nickname
type string Group type, defaulted to 0 (union type); when multiple types of union groups need to be created in the game, contact the QQ side to arrange schedule and to provide specific values.
areaid string used by the test environment: game zone ID; in theory, only 1: QQ, 2: WeChat, but the test environment has a lot of virtual platforms
ip string (new; allow to be left blank) used by the test environment: the address of the game idip, because each game is not the same, it is passed over to facilitate handling
port string (new; allow to be left blank)used by the test environment: the address of the game idip, because each game is not the same, it is passed over to facilitate handling

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
message string If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
data array gc(string),new group number
group_name(string), group name

6) Example:

POST /relation/createbind_groupv2?timestamp=1381288134&appid=100703379&sig=3f308f92212f75cd8d682215cb3fa8&openid=F4382318AFBBD94F856E866043C3472E&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 205

{
    "appid":"100703379",
    "guild_id":"1234",
    "zone_id":"1234",
    "guild_name":"Test the group's functions",
    "platid":"1234",
    "roleid":"1234",
  "partition":"1234",
    "accessToken":"B8C0CB75299FFEA623D766073BE5BC99"
}
//return result
{
    "ret": 0,
    "message": "success",
    "data": {
        "gc": "514915385",
        "group_name": "Test Chinese 1"
    }
}

[Mobile QQ]Group relation query

1) interface name:/relation/get_groupinfov2
2) Interface description: After the guild has been bound to a group, the interface is called to query the relations between the user and the group; it can return the relationship (group leader, administrator, ordinary member, non-member) between the user and the group (new) (need to apply for permission before using it)
3) URL Format:

http://msdktest.qq.com/relation/get_groupinfov2?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string a player's unique identification
accessToken string login state
gc string group number

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
message string If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
data array relation(int), the relationship between the user and the group; 1: group leader, 2: administrator, 3: ordinary member, 4: non-member

6) Example:

POST /relation/get_groupinfov2?timestamp=1381288134&appid=100703379&sig=3f308f92212f75cd8d682215cb3fa8&openid=F4382318AFBBD94F856E866043C3472E&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 98

{
    "appid":"100703379",
    "gc":"426177396",
    "accessToken":"B8C0CB75299FFEA623D766073BE5BC99"
}
//return result
{
    "ret": 0,
    "message": "success",
    "data": {
        "relation": 1
    }
}

[Mobile QQ] join a group

1) interface name:/relation/join_groupv2
2) Interface description: an interface for in-game guild members to join the QQ group. Before calling this interface, first call /relation/get_groupinfov2 interface to check whether the user is a member of the group. If the user is a non-group member, the group-adding button will be displayed (new) (need to apply for permission before using it)
3) URL Format:

http://msdktest.qq.com/relation/join_groupv2?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string a player's unique identification
accessToken string login state
guild_id string guild ID
zone_id string zone server id
gc string group number
platid string platform id (1: Android 2: ios)
roleid string Role id
partition string (zone)zone server id, which may be left blank, and no use for now
user_zone_id string (new; allow to be left blank) the user's zone server ID; the president of the King of Glory guild may transfer it to a person who doesn't belong to this zone server,
so the guild's zone server is not necessarily the user's zone server. if the ID is the same as that of the guild zone server, it can be left blank
user_label string (new; allow to be left blank) add the function of modifying the group's business card; being totally blank means not to modify the group's business card; being not blank means to modify it;
style rule: 【YYYY】ZZZZ, where ZZZZ refers to the user's nickname within the game
nick_name string (new; allow to be left blank) the user's nickname
type string Group type, defaulted to 0 (union type); when multiple types of union groups need to be created in the game, contact the QQ side to arrange schedule and to provide specific values.
areaid string used by the test environment: game zone ID; in theory, only 1: QQ, 2: WeChat, but the test environment has a lot of virtual platforms
ip string (new; allow to be left blank) used by the test environment: the address of the game idip, because each game is not the same, it is passed over to facilitate handling
port string (new; allow to be left blank)used by the test environment: the address of the game idip, because each game is not the same, it is passed over to facilitate handling

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
message string If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
data array empty(string), reserved

6) Example:

POST /relation/join_groupv2?timestamp=1381288134&appid=100703379&sig=3f308f92212f75cd8d682215cb3fa8&openid=F4382318AFBBD94F856E866043C3472E&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 205

{
    "appid":"100703379",
    "guild_id":"123",
    "zone_id":"123",
    "gc":"511720053",
    "partition":"1",
    "platid":"1",
    "roleid":"1",
    "accessToken":"B8C0CB75299FFEA623D766073BE5BC99"
}
//return result
{
    "ret": 0,
    "message": "success",
    "data": {
        "empty": ""
    }
}

[Mobile QQ]unbind a group

1) interface name:/relation/unlink_groupv2
2) Interface description: an interface used to unbind a guild with a QQ group in the game. When the user disbands the guild's QQ group, the guild and the guild's QQ group will not be automatically unbound (new) (need to apply for permission before using it)
PS:If a QQ group is disbanded, there are two ways to cancel its binding relations:
1. The president calls the unbinding interface to unbind the group's relations
2. When a guild member calls the group-joining interface, the group ID can't be queried at this time and unbinding is performed by default
When a QQ group is disbanded without performing any of the above operations, the binding relationship does not disappear automatically
3. After the guild leader transfers it, the new guild leader can also perform the unbinding operation

3) URL Format:

http://msdktest.qq.com/relation/unlink_groupv2?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string a player's unique identification
accessToken string login state
guild_id string union ID
zone_id string zone server id
platid string platform id (1: Android 2: ios); it can't be null
roleid string role id; it can't be null
guild_name string guild or guild name
user_zone_id string (new; allow to be left blank) the user's zone server ID; the president of thethe King of Glory guild may transfer it to a person who doesn't belong to this zone server,
so the guild's zone server is not necessarily the user's zone server. if the ID is the same as that of the guild zone server, it can be left blank
type string Group type, defaulted to 0 (union type); when multiple types of union groups need to be created in the game, contact the QQ side to arrange schedule and to provide specific values.
areaid string used by the test environment: game zone ID; in theory, only 1: QQ, 2: WeChat, but the test environment has a lot of virtual platforms
ip string (new; allow to be left blank) used by the test environment: the address of the game idip, because each game is not the same, it is passed over to facilitate handling
port string (new; allow to be left blank)used by the test environment: the address of the game idip, because each game is not the same, it is passed over to facilitate handling

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
message string If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
data array empty (string), reserved field

6) Example:

POST /relation/unlink_groupv2?timestamp=1381288134&appid=100703379&sig=3f308f92212f75cd8d682215cb3fa8&openid=F4382318AFBBD94F856E866043C3472E&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 141

{
    "appid":"100703379",
    "guild_id":"123",
    "zone_id":"123",
    "platid":"1",
    "roleid":"1",
    "guild_name":"Test Chinese 1",
    "accessToken":"B8C0CB75299FFEA623D766073BE5BC99"
}
//return result
{
    "ret": 0,
    "message": "success",
    "data": {
        "empty": ""
    }
}

[mobile QQ]Interface used to get QQ group list

1) interface name:/relation/get_group_listv2
2) Interface description: the interface is used to get the created group list when the guild president binds the guild to the QQ groups that he has created.
3) URL Format:

http://msdktest.qq.com/relation/get_group_listv2?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string a player's unique identification
accessToken string login state

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
message string If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
data Object information returned by json
group_list array list of groups created by me
gc string group number
group_name string group name

6) Example:

POST /relation/get_group_listv2?timestamp=1381288134&appid=100703379&sig=3f308f92212f75cd8d682215cb3fa8&openid=F4382318AFBBD94F856E866043C3472E&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 141

{
    "appid":"100703379",
    "accessToken":"B8C0CB75299FFEA623D766073BE5BC99"
}
//return result
{
    "ret": 0,
    "message": "success",
    "data": {
        "group_list": [
                        {"gc": "","group_name": ""}
                      ]

    }
}

[mobile QQ] Interface used to bind the created QQ groups

1) interface name:/relation/bind_existing_groupv2
2) Interface description: this interface is used for the guild president to bind the guild to the QQ groups that he has created; call /relation/get_group_listv2 interface to get the list of created groups before calling this interface
3) URL Format:

http://msdktest.qq.com/relation/bind_existing_groupv2?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string a player's unique identification
accessToken string login state
guild_id string union ID
zone_id string zone server id
gc string group number
group_name string group name
platid string Platform id
roleid string Role id
user_zone_id string the user's zone server ID; the president of the King of Glory guild may transfer it to a person of non-zone server,
so the guild's zone server is not necessarily the user's zone server. Like the guild zone server, the ID can be left blank
type string Group type, defaulted to 0 (union type); when multiple types of union groups need to be created in the game, contact the QQ side to arrange schedule and to provide specific values.
areaid string used by the test environment: game zone ID; in theory, only 1: QQ, 2: WeChat, but the test environment has a lot of virtual platforms
ip string (new; allow to be left blank) used by the test environment: the address of the game idip, because each game is not the same, it is passed over to facilitate handling
port string (new; allow to be left blank)used by the test environment: the address of the game idip, because each game is not the same, it is passed over to facilitate handling

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
message string If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
data array empty (string), reserved

6) Example:

POST /relation/bind_existing_groupv2?timestamp=1381288134&appid=100703379&sig=3f308f92212f75cd8d682215cb3fa8&openid=F4382318AFBBD94F856E866043C3472E&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 141

{
    "appid":"100703379",
    "guild_id":"123",
    "zone_id":"123",
    "gc":"511720053",
    "partition":"1",
    "platid":"1",
    "roleid":"1",
    "accessToken":"B8C0CB75299FFEA623D766073BE5BC99"
}
//return result
{
    "ret": 0,
    "message": "success",
    "data": {
        "empty": ""
    }
}

[mobile QQ]Interface used to remind the president to bind his guild to a group

1) interface name:/relation/remind_leader_bindv2
2) Interface description: When a guild is not bound to a group, members can remind the guild president to bind the group through the interface; bind the guild to the QQ group that I have created, and receive notifications through the official account "QQ mobile game"; the frequency is to receive only one piece a day; the reminder and the reminded person must be guild members, and the game side guaranteed that the reminded person is the guild president
3) URL Format:

http://msdktest.qq.com/relation/remind_leader_bindv2?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string a player's unique identification
accessToken string login state
guild_id string union ID
zone_id string zone server id
platid string Platform id
roleid string Role id
rolename string role name, used for message text
user_zone_id string the user's zone server ID; the president of the King of Glory guild may transfer it to a person of non-zone server,
so the guild's zone server is not necessarily the user's zone server. Like the guild zone server, the ID can be left blank
type string Group type, defaulted to 0 (union type); when multiple types of union groups need to be created in the game, contact the QQ side to arrange schedule and to provide specific values.
leaderOpenid string the guild president's openId
leaderRoleid string the guild president's roleid
leaderZoneid string the president's zone server information; the president can transfer it to a person who doesn't belong to this zone server; if the ID is the same as that of the guild zone server, it can be left blank
areaid string used by the test environment: game zone ID; in theory, only 1: QQ, 2: WeChat, but the test environment has a lot of virtual platforms
ip string (new; allow to be left blank) used by the test environment: the address of the game idip, because each game is not the same, it is passed over to facilitate handling
port string (new; allow to be left blank)used by the test environment: the address of the game idip, because each game is not the same, it is passed over to facilitate handling

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
message string If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
data Object Object returned

6) Example:

POST /relation/remind_leader_bindv2?timestamp=1381288134&appid=100703379&sig=3f308f92212f75cd8d682215cb3fa8&openid=F4382318AFBBD94F856E866043C3472E&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 141

{
    "appid":"100703379",
    "guild_id":"123",
    "zone_id":"123",
    "gc":"511720053",
    "partition":"1",
    "platid":"1",
    "roleid":"1",
    "accessToken":"B8C0CB75299FFEA623D766073BE5BC99"
}
//return result 
{
    "ret": 0,
    "message": "success",
    "data": {
        "empty": ""
    }
}

[mobile QQ] Query the group-bound union

1) interface name:/relation/query_bind_unionv2
2) Interface description: Query the information of the guild bound to a group based on the group's ID
3) URL Format:

http://msdktest.qq.com/relation/query_bind_unionv2?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string a player's unique identification
accessToken string login state
gc string group number
type string Group type, defaulted to 0 (union type); when multiple types of union groups need to be created in the game, contact the QQ side to arrange schedule and to provide specific values.

5)Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
message string If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
data Object The returned json data
union_id string guild/team/event ID
union_name string guild/team/event name

6) Example:

POST /relation/query_bind_unionv2?timestamp=1381288134&appid=100703379&sig=3f308f92212f75cd8d682215cb3fa8&openid=F4382318AFBBD94F856E866043C3472E&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 141

{
    "appid":"100703379",
    "guild_id":"123",
    "zone_id":"123",
    "gc":"511720053",
    "type":"0",
    "accessToken":"B8C0CB75299FFEA623D766073BE5BC99"
}
//return result
{
    "ret": 0,
    "message": "success",
    "data": {
        "union_id": "xxx",
        "union_name": "xxx"
    }
}

[mobile QQ]Get the group information (the interface is a V2 interface)

1) interface name:/relation/get_groupcode
2) Interface description: If the group number of the QQ group can be gotten through guild ID, the group is bound; if no guild name is entered when creating a group, the group name obtained at this time is empty.
3) URL Format:

http://msdktest.qq.com/relation/get_groupcode?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string a player's unique identification
accessToken string login state
guild_id string guild ID
zone_id string zone ID, which is the guild's zone server ID here
type string Group type, defaulted to 0 (union type); when multiple types of union groups need to be created in the game, contact the QQ side to arrange schedule and to provide specific values.

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
message string If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
data Object The returned json data
gc string group number
group_name string group name
group_key string group_key of the QQ group bound with the game guild ID
group_openid string group_openid of the QQ group bound with the game guild ID

6) Example:

POST /relation/get_groupcode?timestamp=1381288134&appid=100703379&sig=3f308f92212f75cd8d682215cb3fa8&openid=F4382318AFBBD94F856E866043C3472E&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 141

{
    "appid":"100703379",
    "guild_id":"123",
    "zone_id":"123",
    "type":"0",
    "accessToken":"B8C0CB75299FFEA623D766073BE5BC99"
}
//return result
{
    "ret": 0,
    "message": "success",
    "data": {
        "gc": "xxx",
        "group_name": "xxx",
        "group_key": "xxx",
        "group_openid": "xxx"

    }
}

[Mobile QQ]send group message

1) interface name:/relation/send_groupmsg
2) Interface description: the interface is used to push the group's obj message (when using the interface, you need to apply for permissions. When applying for permissions, you should provide the callback address to the mobile QQ side for configuration. If the callback address is empty, you can't apply for permissions.)
3) URL Format:

http://msdktest.qq.com/relation/send_groupmsg?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string Application's unique id at the platform
openid string user's unique identification at a given application
accessToken string user's login proof in the application
pf string an application's source platform (fill qquin if you don't know the platform)
group_openid string share the designated group's key (group openid)
title string message title, maximum length of 45 bytes
desc string message abstract, maximum length of 60 bytes
image_url string thumbnail URL on the left side of message
redirect_url string Callback URL (callback URL configured when the third party application is put on shelf; it is not allowed to fill in other domain name address)
param string input parameter of redirect_url; the third party can skip to different details page according to this parameter (by default, it can pass null "")

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
message string If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
is_lost indicate if there is any data loss or not; 1 indicates data loss and 0 indicates data integrity

6) Example:

POST /relation/send_groupmsg?timestamp=*&appid=**&sig=***&openid=**&encode=1 HTTP/1.0
Host:$domain
Content-Type: application/x-www-form-urlencoded
Content-Length: 132

{
    "appid":"1104359534",
    "accessToken":"4F05D9EFF140E2BB6527F266B1E674F1",
    "pf":"qqqun",
    "group_openid":"C672A42F0595BC8309D079D68F45B8CF",
    "title":"11",
    "desc":"11",
    "redirect_url":"http://www.qq.com/",
    "image_url":"http://p.qlogo.cn/gh/31asdasd0/312248990/100",
    "param":"11"
}

//return result
{
    "ret": 0,
    "message": "success",
    "is_lost": "1"
}

[WeChat] Friend's openid

1) interface name:/relation/wxfriends
2) Interface description: Get the openid list of WeChat game friends. After getting the list, use /relation/wxprofile interface to query the basic information of friends in batch.
3) URL Format:

http://msdktest.qq.com/relation/wxfriends?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
accessToken string login state
openid string user's unique identification at a given application

5) Return explanation:

Parameter name Type Description
ret int return code  0:correct,others:failure
msg string If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
openids vector friend list

6) Example:

POST /relation/wxfriends/?timestamp=*&appid=**&sig=**&openid=**&encode=1 HTTP/1.0
Host:$domain
Content-Type: application/x-www-form-urlencoded
Content-Length: 198

{
    "openid": "oGRTijiaT-XrbyXKozckdNHFgPyc",
    "accessToken": "OezXcEiiBSKSxW0eoylIeLl3C6OgXeyrDnhDI73sCBJPLafWudG-idTVMbKesBkhaKJhRmjhioMlDM_zBq_SxfYO2jdJKzAR6DSHL5-02O6oATRKHf57K-teO6bPsB1RHjH5Z0I1TzMn4DllSYrf3Q"
}

//return result 
{
    "ret": 0,
    "msg": "success",
    "openids": ["oy6-ljtb1PKnNtRKlouJAj952hlg", "oy6-ljrzoW6jjxS2jI2LHZvGdsqA", "oy6-ljqJeurpVex1kyRAZl5blq3U", "oy6-ljoHSdnupQFMgHNTWoqSXXVg", "oy6-ljl-aYH1tl3L2clpVhhVXHtY"]
}

[WeChat] game friends' info(only for premium games, no remarks)

1) interface name:/relation/wxprofile
2) Interface description: Get the basic info of game friends of WeChat account; no remarks; strangers' information can't be gotten
3) URL Format:

http://msdktest.qq.com/relation/wxprofile?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
accessToken string login state
openids vector the list of openid accounts that need to be gotten
(If you want to get the current login user's WoCard information, please place the user's openid at the first place,
because only the openid at the first place can get WoCard information, and the subsequent openids are unable to get WoCard information)

5) Return explanation:

Parameter name Type Description
ret int return code  0:correct,others:failure
msg string If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
lists information list vector<WXInfo> type
privilege User privilege information , json array, such as WeChat WoCard user is (chinaunicom) only return the corresponding WoCard information of the first openid, and later openid can't get WoCard information
struct WXInfo {
    string          nickName;       //only return nickname
    int             sex;           //gender: gender 1 male 2 female; null is defaulted as 0
    string          picture;        //the user's avatar URL; it is required to add the following parameters /0, /132, /96, /64 after URL, so as to obtain pictures of different specifications: original pictures (/0), 132*132(/132), 96*96(/96), 64*64(/64), 46*46(/46)
    string          provice;        //province
    string          city;           //city
    string          openid;         //user ID
    string          country         //country 
    string          language       //language 
};

6) Example:

POST /relation/wxprofile/?timestamp=*&appid=**&sig=***&openid=**&encode=1 HTTP/1.0
Host:$domain
Content-Type: application/x-www-form-urlencoded
Content-Length: 198
{
    "accessToken": "OezXcEiiBSKSxW0eoylIeLl3C6OgXeyrDnhDI73sCBJYyBcXKXYWTlxU_BAMfu7Rzsr51Nu-CarhcPT6zYlD9FrWRzuA0ccQMgrTGqpao2Ccq_dcbciAvC8frI3gYk5d2p6pDFy-bOqyPTNysUxOQg",
    "openids": ["oGRTijrV0l67hDGN7dstOl8CphN0", "oGRTijlTxQPrvr-H5-pgoZMhZgog"]
}

//return result
{
    "country": "CN",
    "language": "zh_CN",
    "lists": [
    {
        "city": "Shenzhen",
        "nickName": "Hante",
        "openid": "oGRTijrV0l67hDGN7dstOl8CphN0",
        "picture": "http://wx.qlogo.cn/mmhead/RpIhxf6qwjeF1QA6YxVvE8El3ySJHWCJia63TePjLSIc",
        "provice": "",
        "sex": 1
    },
    {
        "city": "Zhongshan",
        "nickName": "WeGame Test",
        "openid": "oGRTijlTxQPrvr-H5-pgoZMhZgog",
        "picture": "",
        "provice": "",
        "sex": 2
    }
    ],
    "msg": "success",
    "privilege": [],
    "ret": 0
}

[WeChat] In-game friend information (with remarks)

1) Interface name: /relation/wxfriends_profile
2) Interface description: Get the basic information of WeChat individuals and in-game friends
3) URL format:

http://msdktest.qq.com/relation/wxfriends_profile?timestamp=&appid=&sig=&openid=&encode=2 

4) Description of input parameters:

Parameter name Type Description
appid string Unique ID of the game
openid string User's unique identifier
accessToken string Login status
closefriends_flag int Whether to return intimate friends. The default value is null or 0, meaning NO; 1 means YES

5) Return description:

Parameter name Type Description
ret int Return code 0: success, others: failure
msg string When ret is not 0, it means "error code, error prompt"; please refer to the description of error codes for detailed comments
lists vector WeChat in-game friend's personal information list, typevector<WXInfo>
privilege array The user's privilege information, which is a json array; for example, WeChat Woka user is (chinaunicom)
Only the Woka information corresponding to the first `openid` is returned, and the Woka information corresponding to subsequent `openid` cannot be obtained
country string Country; the platform fixedly returns an empty string
language string Language
extinfo object The corresponding data json object
closefriend_lists array The returned data list

struct WXInfo {
	string          nickName;      //nickname (by default, this field gives priority to the use of the friend remark. If there is no remark, the friend nickname will be used.This field will be controlled at any time according to the policy. If there is a clear need to use the remark, please be sure to use the `friendRemark` field to obtain the remark)
	string          picture;       //The user's avatar URL; the URL must be appended with the following parameters/0,/132,/96,/64 to obtain images of different specifications respectively: original image (/0), 132*132(/132), 96*96(/96), 64*64(/64), 46*46(/46)
	string          provice;       //Province (the platform returns an empty string in a fixed way)
	string          openid;        //the user's ID
	string          friendRemark;  //friend remark (This field exists only when the permission is normal and WeChat returns remark normally;This field was added in September 2022 and is not returned by default. If your app needs to use it, you need to contact MSDK to configure it for your app)
};

6) Example:

POST /relation/wxfriends_profile/?timestamp=1380018062&appid=wxcde873f99466f74a&sig=dc5a6330d54682c88846b1294fbd5fde&openid=oGRTijrV0l67hDGN7dstOl8CphN0&encode=2
{
    "accessToken": "OezXcEiiBSKSxW0eoylIeLl3C6OgXeyrDnhDI73sCBJYyBcXKXYWTlxU_BAMfu7Rzsr51Nu76pqG7N3Mh6ZI79VLoFSM7wdVpS4bz61Vg",
    "openid": "oGRTijrV0l67hDGN7dstOl8CphN0",
    "closefriends_flag": 1
}
//Return result
{
    "country": "",
    "language": "",
    "ret": 0,
    "msg": "success",
    "lists": [{
		"nickName": "ufo",
		"picture": "http:\/\/wx.qlogo.cn\/mmhead\/LwcbhAmMnZBAqZyUkv1z3qJibczZRdrZRkTgcNnqKqovicmDxLmyffdQ",
		"provice": "",
		"openid": "oy6-ljl-aYH1tl3L2clpVhhVXHtY",
		"friendRemark": "Tutu"
		},
	{
		"nickName": "Lewis",
		"picture": "http:\/\/wx.qlogo.cn\/mmhead\/zreQPiaCicYfReYeU0sicsc92cfBdMejRFsicXK1fZibP7aM",
		"provice": "",
		"openid": "oy6-ljoHSdnupQFMgHNTWoqSXXVg",
		"friendRemark": "zhuzhu"
		}],
    "privilege": [],
    “extinfo”:{
    "closefriend_lists":[
		{"openid":"OPENID1"},    
		{"openid":"OPENID2"}
		]
	}
}

[WeChat]Personal information (for non-premium services)

1) interface name:/relation/wxuserinfo
2) Interface description: Get WeChat personal information and provide it to "non-premium services"
3) URL Format:

http://msdktest.qq.com/relation/wxuserinfo?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
accessToken string login state
openid string user's unique identification at a given application

5) Return explanation:

Parameter name Type Description
ret int return code  0:correct,others:failure
msg string If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
nickname string nickname
picture string user avatar URL; it is required to add the following parameters /0, /132, /96, /64 after URL to obtain pictures of different specifications:
original pictures(/0), 132132(/132), 9696(/96), 6464(/64),
46
46(/46)
province string province; Platform fixed return empty string
city string city; Platform fixed return empty string
country string Country; Platform fixed return empty string
sex string gender; Platform fixed return 0, 0 means unknown
unionid string the user's unified marker. For applications under one WeChat open platform account, the same user's unionid is unique
privilege array User privilege information , json array, such as WeChat WoCard user is (chinaunicom) only return the corresponding WoCard information of the first openid, and later openid can't get WoCard information
language string language (may be null)
gpsCity string City acquired through GPS
openid string user's unique identification in app

6) Example:

POST /relation/wxuserinfo/?timestamp=*&appid=**&sig=***&openid=**&encode=1 HTTP/1.0
Host:$domain
Content-Type: application/x-www-form-urlencoded
Content-Length: 198

{
    "appid": "wxcde873f99466f74a",
    "openid": "oGRTijrV0l67hDGN7dstOl8CphN0",
    "accessToken": "OezXcEiiBSKSxW0eoylIeLl3C6OgXeyrDnhDI73sCBJYyBcXKXYWTlxU_BAMfu7Rzsr51Nu-CarhcPT6zYlD9FrWRzuA0ccQMgrTGqpao2C-TqXCXdT-DZ44iKkidglb5Q9jQbXnMPrSTck_DUdGMg"
}

//return result
{
    "city": "",
    "country": "",
    "msg": "success",
    "nickname": "xxx",
    "picture": "http://wx.qlogo.cn/mmopen/uQDECzzFUic3xMCxSqQwsgXZqgCB2MtscmicF20OGZiaKia6fMlqOLuGjlibiaUnVPk0GoGwkKWv2MIa8e4BSwXRHn7ia7zRn1bVz9E/0",
    "privilege": [],
    "province": "",
    "ret": 0,
    "sex": "0",
    "unionid": "o1A_BjhwQHB2BUyasZ_Lb2rkkOpE"
}

[WeChat] Query group member's information

1) interface name:/relation/wxget_groupinfo
2) Interface description: When a guild has been bound with a group, call the interface to query the relationship information of the user and the group; the interface can return information about whether the user is a group member
3) URL Format:

http://msdktest.qq.com/relation/wxget_groupinfo?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string a player's unique identification
accessToken string login state
groupid string guild id
openidlist string guild member's openid, separated with commas; need to verify if the guild member is a group member

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
message string If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
platCode string a parameter returned by WeChat platform; when ret isn't 0, pay attention to it
openidlist string the member list of the existing group, separated with commas. Non-existed openid is not returned
membercount int the number of group members

6) Example:

POST /relation/wxget_groupinfo?timestamp=1507881410&appid=wxcde873f99466f74a&sig=b98ea62991568a72b09f7e2675014a6d&openid=oGRTijuUl6Peo6lybWyGQfNC9_WE&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 98

{
      "accessToken":"-2aMHhqC8Mmqsuw_1h3Fd_VRb232WayUbBmrtSnPNiHAOqvNN8oUU8tnMgkZOyEmcqpwDtMuyj63aeVywIAASg",
      "groupid": "110",
      "appid": "wxcde873f99466f74a",
      "openid": "oGRTijuUl6Peo6lybWyGQfNC9_WE",
      "openidlist": "oGRTijuUl6Peo6lybWyGQfNC9_WE"
}

//return result

   {  "membercount":2,
      "msg":"success",
      "openidlist":"oGRTijuUl6Peo6lybWyGQfNC9_WE",
      "platCode":"",
      "ret":0
      }

[WeChat]unbind a group

1) interface name:/relation/wxunlink_group
2) Interface description: WeChat unbinds a group
3) URL Format:

http://msdktest.qq.com/relation/wxunlink_group?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
accessToken string login state
groupid string guild id

5) Return explanation:

Parameter name Type Description
ret int return code  0:correct,others:failure
msg string If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description

6) Example:

POST /relation/wxunlink_group?timestamp=*&appid=**&sig=***&openid=**&encode=2 HTTP/1.0
Host:$domain
Content-Type: application/x-www-form-urlencoded
Content-Length: 198

{
    "accessToken": "OezXcEiiBSKSxW0eoylIeLl3C6OgXeyrDnhDI73sCBJhKgRRgn5ztwrcCr1jwFWMow9ZDDD69U1GlL6tPS4GLX4nk6rIKoCEMz5ScKJ6bFmn0uT_eu0yhklQxkkhxjQS8v-ul7-ZEVHQleIchtSTyg",
    "groupid" : "2147521896"
}

//return result
{
    "ret": 0,
    "msg":"success"
}

[WeChat]query the group state

1) interface name:/relation/wxget_groupstatus
2) Interface description: Query group status
3)URL Format:

http://msdktest.qq.com/relation/wxget_groupstatus?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
accessToken string login state
groupid string guild id
op_type int 0: query whether or not to create a group; 1: query whether or not to join a group

5) Return explanation:

Parameter name Type Description
ret int return code  0:correct,others:failure
msg string If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
is_has int only when ret is 0 does it indicate the correct value; 0 indicates the guild has created or joined no group, 1 indicates the guild has created or joined a group

6) Example:

POST /relation/wxget_groupstatus?timestamp=*&appid=**&sig=***&openid=**&encode=2 HTTP/1.0
Host:$domain
Content-Type: application/x-www-form-urlencoded
Content-Length: 198

{
    "accessToken": "OezXcEiiBSKSxW0eoylIeLl3C6OgXeyrDnhDI73sCBJhKgRRgn5ztwrcCr1jwFWMow9ZDDD69U1GlL6tPS4GLX4nk6rIKoCEMz5ScKJ6bFmn0uT_eu0yhklQxkkhxjQS8v-ul7-ZEVHQleIchtSTyg",
    "groupid": "2147521896",
    "op_type": 0
}

//return result
{
    "ret": 0,
    "msg": "success",
    "is_has": 0
}

[WeChat] Send group messages

1) interface name:/relation/wxsend_groupmsg
2) Interface description: send the group's messages
3) URL Format:

http://msdktest.qq.com/relation/wxsend_groupmsg?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
accessToken string WeChat's accessstoken
openid string user's unique identification at a given application
reqBody json json Object data requested to WeChat

json data explanation

Data json format:
{
    "reqBody":{
        "msg_type" : 1, //int,message type, 1: structured sharing; 2: link sharing 
        "sub_type" : 2, //int,share type; invite: 1; show off: 2; give: 3; ask for: 4
        "appid" : "wxa28d26b2e31a21c4", //string,WeChat's appid
        "groupid" : "mt2group", //string,guild id
        "open" : {
            "title" : "test1", //string, the title of the message
            "desc" : "test2", //string, the introduction of the message
            "share_url" : "https://game.weixin.qq.com/cgi-bin/act?noticeid=90103953&actid=7006&k=Q6EgQ_8DgubBRXGb1vmTBw&q=0&jsapi_ticket=1&hongbaoid=8CF558E6633CCB020796260075B95465#wechat_redirect", //string, hoplink; when msg_type equal to 1, it isn't needed to carry the parameter; when msg_type is equal to 2, it is needed to carry the parameter
            "ext_info" : "test3", //string, the third-party program's user-defined simple data; WeChat will transmit it to the third-party program to handle; the length is controlled within 2k. This field can be gotten when the user clicks on the client
            "message_ext" : "test4", //string, extra field for message
            "media_tag_name" : "test5", //string, used to distinguish game message type; used for data statistics
        }
    }
}

5) Return explanation:

Parameter name Type Description
ret int return code  0:correct,others:failure
msg string If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
platCode string platform error code; pay attention to it when ret is not 0

6) Example:

POST /relation/wxsend_groupmsg?timestamp=*&appid=**&sig=***&openid=**&encode=2 HTTP/1.0
Host:$domain
Content-Type: application/x-www-form-urlencoded
Content-Length: 198

{
    "appid": "wxcde873f99466f74a",
    "openid": "oGRTijrV0l67hDGN7dstOl8CphN0",
    "accessToken": "OezXcEiiBSKSxW0eoylIeLl3C6OgXeyrDnhDI73sCBJYyBcXKXYWTlxU_BAMfu7Rzsr51Nu-CarhcPT6zYlD9FrWRzuA0ccQMgrTGqpao2AFUqpPDuHWnG-7zOK_CIkx0PWh694IgF0gRriiB4qj3A",
    "reqBody":{
        "msg_type" : 1,
        "sub_type" : 2,
        "appid" : "wxa28d26b2e31a21c4",
        "groupid" : "mt2group",
        "open" : {
            "title" : "test1",
            "desc" : "test2",
            "share_url" : "https://game.weixin.qq.com/cgi-bin/act?noticeid=90103953&actid=7006&k=Q6EgQ_8DgubBRXGb1vmTBw&q=0&jsapi_ticket=1&hongbaoid=8CF558E6633CCB020796260075B95465#wechat_redirect",
            "ext_info" : "test3",
            "message_ext" : "test4",
            "media_tag_name" : "test5",
        }
    }
}

//return result
{
    "ret":0,
    "msg":"success",
    "platCode":""
}

personal information

[mobile QQ] Get a player's first login flag after the player makes real-name registration

1) interface name:/profile/qqget_first_reg
2) Interface description: Get a player's first login flag after the player makes real-name registration.
3) URL Format:

http://msdktest.qq.com/profile/qqget_first_reg?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
accessToken string login state

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
msg string if ret isn't 0, see the error description returned in msg
need_pop string a flag showing whether or not it is needed to pop up a window; "1": yes; others: no; remarks: pop up a window only when "1" is clearly received successfully; do not pop up any window in case of other values or exceptions
realname_flag string real-name flag; "1": real name; others: not real name
mobile_flag string a flag showing whether the user registers with his or her mobile phone number; "1": register with the mobile phone number; others: register not with the mobile phone number

6) Example:

POST /profile/qqget_first_reg?timestamp=1510046500&appid=100703379&sig=b6080f45265d07fe5a48028cf59d8507&openid=061C8A0EC0E107B058960FBF2B3A3C41&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 77
{
    "accessToken":"0F6D3680BE37ADB831480D4D394F0614"
}
//return result
{
    "ret":0,
    "msg":"success",
    "need_pop":"0",
    "realname_flag":"1",
    "mobile_flag":"1"

}

[Mobile QQ] Get VIP information

1) interface name:/profile/query_vip
2) Interface description: Get QQ account VIP information (with login state).
3) URL Format:

http://msdktest.qq.com/profile/query_vip?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string a player's unique identification
accessToken string login state
vip int Query type:
member:vip&0x01 !=0;
QQ level:vip&0x02!=0;
blue diamond:vip&0x04 != 0;
red diamond:vip&0x08 != 0;
super member:vip&0x10 != 0;
Xinyue:vip&0x40 != 0;
yellow diamond:vip&0x80 != 0;
animation:vip&0x100 != 0;
Xinyue level (new interface):vip&0x200 != 0;Joy gamer level description; the larger the number, the higher the level, as described below:
1: Gamer G1
2: Gamer G2
3: Gamer G3
4: Gamer G4
5:Joy vip1
6:Joy vip2
7:Joy vip3
the aforesaid levels can be combined at will (logical AND); if members and blue diamond need to be queried at the same time,(vip&0x01 !=0) && (vip&0x04 != 0) is true,(remark: only fill in relevant identification bits at the time of request)
xinyue_upgrade int When the value is 1, it indicates to use Xinyue’s new interface

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
msg string if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
lists array flag (int);
isvip (int) determine the user VIP state's unique identification, (0 no, 1 yes);
year (int) annual fee? (0 yes, 1 no); 
level (int) VIP level;
when request parameter xinyue_upgrade=1, the value of level is the new level of xinyue, as follows: 1: Gamer, 2: Gamer Pro, 3: V1, 4: V2, 5: V3, 6: V4, 7: V5
luxury (int) luxury version? (0 no, 1 yes);
flag value explanation:
  VIP_NORMAL(member) = 1,
  VIP_QQ_LEVEL(QQ level) = 2,  //QQ level; only need to pay attention to the "level" parameter, and others are invalid
  VIP_BLUE(blue diamond) = 4,
  VIP_RED (red diamond)= 8, //red diamond has no annual fee membership logo return
  VIP_SUPER (super members)= 16,  //QQ super member; only isvip is valid
  VIP_XINYUE = 64,   //Xinyue club's privileged member; when the flag is requested, only isvip and level are valid
  VIP_YELLOW = 128,  //yellow diamond member
    VIP_ANIMIC = 256,  //animation member, only isvip is effective
    VIP_XINYUE_NEW = 512,  //Xinyue level (new interface)

6) Example:

POST /profile/query_vip?timestamp=1381288134&appid=100703379&sig=3f308f92212f75cd8d682215cb3fa8&openid=F4382318AFBBD94F856E866043C3472E&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 198
{
    "appid": "100703379",
    "openid": "A3284A812ECA15269F85AE1C2D94EB37",
    "vip": 512,
    "accessToken":"A3284A812ECA15A3284A812ECA15269F85AE1C2D94EB37269F85AE1C2D94EB37"
}
//Return format
{
    "ret": 0,
    "msg": "",
    "lists": [{
        "flag": 1,
        "year": 0,
        "level": 0,
        "luxury": 0,
        "isvip": 0
    },{
        "flag": 2,
        "year": 0,  
        "level": 10, 
        "luxury": 0, 
        "isvip": 1  
    },
    {
        "flag": 4,
        "year": 0,
        "level": 0,
        "luxury": 0,
        "isvip": 0
    },
    {
        "flag": 8,
        "year": 0,
        "level": 0,
        "luxury": 0,
        "isvip": 0
    },
    {
        "flag": 0,
        "year": 0,
        "level": 11,
        "luxury": 0,
        "isvip": 0
    }]
}

[Mobile QQ]blue diamond gift bag

1) interface name:/profile/get_gift
2) Interface description: get blue diamond gift bag, and clear the gift bag after the interface is called once.
3) URL Format:

http://msdktest.qq.com/profile/get_gift?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string a player's unique identification

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
msg string if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
GiftPackList array giftId(string) gift bag id
giftCount(string) the number of corresponding gift bags

6) Example:

POST /profile/get_gift?timestamp=1381288134&appid=100703379&sig=3f308f92212f75cd8d682215cb3fa8&openid=F4382318AFBBD94F856E866043C3472E&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 77
{
    "appid": "100703379",
    "openid": "F4382318AFBBD94F856E866043C3472E"
}
//return result
{
    "GiftPackList": [
        {
            "giftCount": "1",
            "giftId": "1001"
        }
    ],
    "msdkExtInfo": "testhunter",
    "msg": "success",
    "ret": 0
}

[Mobile QQ] wifi qualification

1) interface name:/profile/get_wifi
2) Interface description: Get portable wifi qualification.
3) URL Format:

http://msdktest.qq.com/profile/get_wifi?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string a player's unique identification

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
msg string if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
wifiVip int 1: wifivip qualification, 0: non-wifivip qualification

6) Example:

POST /profile/get_wifi?timestamp=1381288134&appid=100703379&sig=3f308f92212f75cd8d682215cb3fa8&openid=F4382318AFBBD94F856E866043C3472E&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 77
{
    "appid": "100703379",
    "openid": "F4382318AFBBD94F856E866043C3472E"
}
//return result
{
    "msg": "success",
    "ret": 0,
    "wifiVip": 1
}

[Mobile QQ] Report achievements

1) interface name:/profile/qqscore_batch
2) Interface description: reported the player's achievements to QQ platform, and display friends' score ranking in the QQ Game Center. (Take effect in real time. You can verify via the page if the data are reported successfully: http://gpmmobile.oa.com/index.php?module=tools&action=query_achieve&func=query_achieve. Note: If you do not have permissions, please contact MSDK Assistant for specific usage methods)
3) URL Format:

http://msdktest.qq.com/profile/qqscore_batch?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string a player's unique identification
accessToken string login state
param array data(string) achievement value;
expires(string) unix timestamp, unit: second, indicating that data will expire at a given time point. If the value is 0, the logo will never expire. If there is no transmission, the default value is 0 ;
type(int) uploads the field type. As for specific type, refer to the document offered by mobile QQ game center, for example, 1 represents level;
bcover(int) data related to the leaderboard bcover=0, others, bcover=1. The game center's leaderboard keeps consistent with the game's leaderboard;1 indicates overwritten reporting, that is, this report will overwrite the previous data. No transmission or transmission of other values indicates incremental reporting, that is, only record the data higher than the previous time

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
msg string if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description

6) Example:

POST/profile/qqscore_batch?timestamp=1381288134&appid=100703379&sig=3f308f92212f75cd8d682215cb3fa8**&openid=F4382318AFBBD94F856E866043C3472E&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 418
{
    "appid": "100703379",
    "accessToken": "E16A9965C446956D89303747C632C27B",
    "openid": "F4382318AFBBD94F856E866043C3472E",
    "param": [
        {
            "type": 3,
            "bcover": 1,
            "data": "999",
            "expires": "123459751"
        },
        {
            "type": 2,
            "bcover": 1,
            "data": "1999",
            "expires": "123459751"
        }
    ]
}

//return result
{"msg":"success","ret":0,"type":0}

Get Xinyue Super R player's memebership ID(the interface is GET request)

1)Interface name: /profile/get_xinyue_super
2)Interface description: Get Xinyue Super R player's memebership level information.
3)URL format:

http://msdktest.qq.com/profile/get_xinyue_super?timestamp=&appid=&sig=&openid=&encode=2 

4)Parameter description:

Parameter name Description
appid The game's unique identification
access_token login state
access_type Access type, 1: login via manual QQ, 2: login via WeChat
trace_id Call unique string code; it is recommended to be "business abbreviation -openid-YYYYMMDDHHMMSS-xxxxxx (6-bit random number)"

5)Return explanation:

Parameter name Description
ret return code0: correct, others: failure
msg if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
ilevel Super R member level, 10: Super R, 11: Top R, 0: Non-Super R member; if the interface returns failure, this field defaults to 0
openid request string passthrough
trace_id request string passthrough

6) Example:

GET
http://msdktest.qq.com/profile/get_xinyue_super?timestamp=1516607574&appid=100703379&sig=f5aa90f284adaf00173fe9e09a94f554&openid=E1FBBD6FCDC5D68B47A376FBE041D181&access_type=1&access_token=25600878E96CB97745BFC04C26E37891&trace_id=msdkdemo-E1FBBD6FCDC5D68B47A376FBE041D181-20180116155309-123456&encode=2 

//return result
{
    "ret":0,"openid":"E1FBBD6FCDC5D68B47A376FBE041D181","ilevel":0,"trace_id":"msdkdemo-E1FBBD6FCDC5D68B47A376FBE041D181-20180116155309-123456","msg":"success"
}

Get the membership ID of a player at Xinyue WeChat platform(The interface is a GET request)

1)Interface name:/profile/get_wx_xinyue_vip
2)Interface description: Get the membership level of a player at Xinyue WeChat platform.
3)URL Format:

http://msdktest.qq.com/profile/get_wx_xinyue_vip?timestamp=&appid=&sig=&openid=&access_token=&serial=&seven_flag=&encode=2 

4)Parameter description:

Parameter name Description
appid The game's unique identification
access_token login state
serial serial number, suggested as "business abbreviation _YYYYMMDD_HHMMSS_xxxxxx (6-bit random number)"
seven_flag when the value is 1,return Level 7 Joy vip member's information (1: Gamer G1; 2: Gamer G2; 3: Gamer G3; 4: Gamer G4; 5: Joy vip1; 6: Joy vip2; 7: Joy vip3);
In case of other values, return Level 3 vip member's information (1- Joy vip1; 2- Joy vip2; 3- Joy vip3)
When request parameter xinyue_upgrade=1, it is a new level for xinyue, as follows: 1: Gamer, 2: Gamer Pro, 3: V1, 4: V2, 5: V3, 6: V4, 7: V5
xinyue_upgrade int; when the value is 1, it indicates to use xinyue’s new interface

5)Return explanation:

Parameter name Description
ret return code0: correct, others: failure
msg if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
ilevel Joy level; in case of a non-Joy user, return 0; As for the meaning of a level, please refer to the description of incoming parameter seven_flag
serial request string passthrough

6) Example:

GET
http://msdktest.qq.com/profile/get_wx_xinyue_vip?timestamp=1521454585&appid=wxd477edab60670232&sig=3fe590a9a0308fcc29785db6b51d6655&openid=oKdX1jiB72W-4E16xBa5jFFEl-4g&access_token=8_navsBc9yyjjABA_SWUTXgrRzrkDv562EG8-q15ZEz3ETKbZL52Z2rQexWaqitBD0eXespWD5PbI5hk2SNRBPtCg_2nX5_S_4j0wRBsF6jh0&serial=MSDK_20180327_181625_123456&seven_flag=1&encode=2 

//return result
{
    "ret":0,"ilevel":0,"serial":"MSDK_20180327_181625_123456","msg":"success."
}

[WeChat]Get privileges

1) interface name:/profile/wxget_vip
2) Interface description: Get WeChat privileges
3) URL Format:

http://msdktest.qq.com/profile/wxget_vip?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string a player's unique identification
accessToken string login state
json array request json, content: {"optype":1}: indicate to get the user and game friend, no other values for now

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
msg string if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
data array privilege information vipinfo

Vipinfo explanation

    //in the vipinfo array, the first piece of record is defaulted to the requester, and the friend comes after it; if there is no data, data is null
    "vipinfo": [    
        {
            "openid": "xxx",
            "level": 1,            //Level
            "score": 310,          //Score
            "nick": "VIP1",        //vip name
            "logo_url": "xxxx",    //vip logo image url
            "logo_faceurl": "xxx"  //URL of vip logo image used for embedding the avatar
            //logo_url and logo_faceurl parameters are unavailable for now, there is no need to give attention to them
        },
                {
            "openid": "xxx",
            "level": 0,
            "score": 0,
            "nick": "VIP0",
            "logo_url": "xxxx",
            "logo_faceurl": "xxx"
        }
    ]

6) Example:

POST /profile/wxget_vip?timestamp=1380018062&appid=wxcde873f99466f74a&sig=dc5a6330d54682c88846b1294fbd5fde&openid=A3284A812E%20CA15269F85AE1C2D94EB37&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 298

{
    "appid": "wxcde873f99466f74a",
    "openid": "oGRTijrV0l67hDGN7dstOl8CphN0",
    "accessToken": "OezXcEiiBSKSxW0eoylIeLl3C6OgXeyrDnhDI73sCBJYyBcXKXYWTlxU_BAMfu7Rzsr51Nu-CarhcPT6zYlD9FrWRzuA0ccQMgrTGqpao2C-TqXCXdT-DZ44iKkidglb5Q9jQbXnMPrSTck_DUdGMg",
    "json": {
        "optype": 1
    }
}

//return result
{
    "msg": "success",
    "ret": 0,
    "data":{
        "vipinfo": [
            {
                "openid": "xxx",
                "level": 1,            
                "score": 310,        
                "nick": "VIP1",        
                "logo_url": "xxxx", 
                "logo_faceurl": "xxx" 
            },
            {
                "openid": "xxx",
                "level": 0,
                "score": 0,
                "nick": "VIP0",
                "logo_url": "xxxx",
                "logo_faceurl": "xxx"
            }
        ]
    }
}

[WeChat] Get a player's first login flag after the player makes real-name registration

1) interface name:/profile/wxget_first_reg
2) Interface description: Get a player's first login flag after the player makes real-name registration.
3) URL Format:

http://msdktest.qq.com/profile/wxget_first_reg?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
accessToken string login state

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
msg string if ret isn't 0, see the error description returned in msg
need_pop string a flag showing whether or not it is needed to pop up a window; "1": yes; others: no;  remarks: pop up a window only when "1" is clearly received successfully; do not pop up any window in case of other values or exceptions
realname_flag string real-name flag; "1": real name; others: not real name
mobile_flag string a flag showing whether the user registers with his or her mobile phone number; "1": register with the mobile phone number; others: register not with the mobile phone number

6) Example:

POST /profile/wxget_first_reg?timestamp=1510046500&appid=wxcde873f99466f74a&sig=dc5a6330d54682c88846b1294fbd5f&openid=A3284A812E%20CA15269F85AE1C2D94EB37&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 77
{
    "accessToken":"OezXcEiiBSKSxW0eoylIeLl3C6OgXeyrDnhDI73sCBJYyBcXKXYWTlxU_BAMfu7Rzsr51Nu-CarhcPT6zYlD9FrWRzuA0ccQMgrTGqpao2C-TqXCXdT-DZ44iKkidglb5Q9jQbXnMPrSTck_DUdGMg"
}
//return result 
{
    "ret":0,
    "msg":"success",
    "need_pop":"0",
    "realname_flag":"1",
    "mobile_flag":"1"

}

[WeChat] Report achievements

1) interface name:/profile/wxbattle_report
2) Interface description: report the game's achievement information (score and combat, etc.) to WeChat game center; the reporting time is the moment when each game, pass or round is completed; the game can also define the reasonable reporting time by itself. WeChat game platform side (Contact MSDK Assistant for specific usage methods) will put forward the requirement on which data the game should report, and the game can report the data after both sides communicate with each other. Take the game called "Universal Aircraft War" for example. Gold coins and physical strength belong to the game's personality data, and the score is selected as the basis for the WeChat friend leaderboard (keep consistent with the game whenever possible).
3) URL Format:

http://msdktest.qq.com/profile/wxbattle_report?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string a player's unique identification
json json Battle json data

json data explanation

Reporting data's json format (single user data):
{
    "baseinfo": {
        "gamename":"Universal Aircraft War", //string type, game name, which should be filled
        "platid": 0, //integer, platform type 0: iOS 1: Andriod, Required
        "partitionid": "9", //string type, partition ID; if the game has no partition concept, this item can be omitted; otherwise, it should be filled
        "roleid": "wongcai", //string type, role ID; if the game has no role concept, this item can be omitted. Otherwise, it should be filled
        "level": 2 //integer, user level; if the game user has no level conept, this item can be omitted; otherwise, it should be filled,
    "battleinfo": {
        "score": 4288625, //integer; this value affects the leaderboard of WeChat games, and it is not required. However, there will be no leaderboard without the data (take "Universal Aircraft War" as an example. The score obtained in the game should be filled in this item)
        "iswin": true //bool, whether or not to win in the current game? It is suitable for chess and card games. If there is no "win" concept, this item can be omitted. Otherwise, it should be filled
    },
    "userdefined": { //the game's user-defined data; the platform can put forward requiements on what data should be reported, but the game side doesn't need toput forward such requiements on its own yet. For example, the platform requires "Universal Aircraft War" to report user-defined data such as gold coins, physical strength and warplanes, wherein, the "value" type is integer or string type:
        "goldcoin": { //User-defined data ID1
            "name": "gold", //string, data name
            "value": 358267, //integer, data value
        },
        "power": { //User-defined data ID2
            "name": "Stamina", //string type, data name
            "value": 86542, //integer, data value 
        },
        "plane": { //User-defined data ID3
            "name": "warplane", //string type, data name
            "value": "Seraphim", //string type, data content
        },
        //user-defined data can be extended continuously
     }
}
//Support a multitude of user batch data, and the aforesaid several single cases can be integrated into json array format:[{用户数据1},{用户数据2},...]

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
msg string if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description

6) Example:

POST /profile/wxbattle_report?timestamp=1380018062&appid=wxcde873f99466f74a&sig=dc5a6330d54682c88846b1294fbd5fde&openid=A3284A812E%20CA15269F85AE1C2D94EB37&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 372
{
    "appid": "wxcde873f99466f74a",
    "openid": "oGRTijrV0l67hDGN7dstOl8CphN0",
    "json":{
        "baseinfo": { 
            "gamename": "xxx",
            "platid": 0,
            "partitionid": "9",
            "roleid": "hunter",
            "level": 2 
        },
        "battleinfo": {
            "score": 4288625,
            "iswin": true
        }
    }
}

//return result
{
    "msg": "success",
    "ret": 0
}

[WeChat] Message subscription

1) interface name:/profile/subscribe_getlist
2) Interface description: the list of subscribed messages
3) URL Format:

http://msdktest.qq.com/profile/subscribe_getlist?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string the player's unique identification, used in marking the source of MSDK backend information (null if there is no source)
accessToken string login state

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
msg string if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
subscribeList array Subscribed list information
more bool Are there more lists, true: Yes, false: No

subscribeList explanation:

"subscribeList": [
    {
        "id": 19,            //message id
        "title": "2111",        //message title
        "status": false        //Subscribed or not? true: subscribed  false: not subscribed yet 
    },
    {
        "id": 43,
        "title": "test_msg",
        "status": false
    }
]

6) Example:

POST /profile/subscribe_getlist?timestamp=1380018062&appid=wxcde873f99466f74a&sig=dc5a6330d54682c88846b1294fbd5fde&openid=A3284A812E%20CA15269F85AE1C2D94EB37&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 257
{
    "appid": "wxcde873f99466f74a",
    "openid": "oGRTijrV0l67hDGN7dstOl8CphN0",
    "accessToken": "OezXcEiiBSKSxW0eoylIeLl3C6OgXeyrDnhDI73sCBJYyBcXKXYWTlxU_BAMfu7Rzsr51Nu-CarhcPT6zYlD9FrWRzuA0ccQMgrTGqpao2C-TqXCXdT-DZ44iKkidglb5Q9jQbXnMPrSTck_DUdGMg"
}

//return result
{
"ret":0,
"msg":"success",
"subscribeList": [
    {
        "id": 19,            //message id
        "title": "2111",        //message title
        "status": false        //Subscribed or not? true: subscribed  false: not subscribed yet 
    },
    {
        "id": 43,
        "title": "test_msg",
        "status": false
    }
],
"more": false
}

[WeChat] Batch subscription

1) interface name:/profile/subscribe_setlist
2) Interface description: batch subscription setting
3) URL Format:

http://msdktest.qq.com/profile/subscribe_setlist?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string the player's unique identification, used in marking the source of MSDK backend information (null if there is no source)
accessToken string login state
msgId array list of requested message ID, such as [1,2,3]
opType int operation type 0-subscribe, 1-cancel

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
msg string if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description

6) Example:

POST http://msdktest.qq.com/profile/subscribe_setlist?timestamp=1380018062&appid=wxcde873f99466f74a&sig=dc5a6330d54682c88846b1294fbd5fde&openid=A3284A812E%20CA15269F85AE1C2D94EB37&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 293
{
    "appid": "wxcde873f99466f74a",
    "openid": "oGRTijrV0l67hDGN7dstOl8CphN0",
    "accessToken": "OezXcEiiBSKSxW0eoylIeLl3C6OgXeyrDnhDI73sCBJYyBcXKXYWTlxU_BAMfu7Rzsr51Nu-CarhcPT6zYlD9FrWRzuA0ccQMgrTGqpao2C-TqXCXdT-DZ44iKkidglb5Q9jQbXnMPrSTck_DUdGMg",
    "msgId": [77],
    "opType": 1
}

//return result
{
"ret":0,
"msg":"success"
}

[WeChat] Subscription push

1) interface name:/profile/subscribe_push
2) Interface description: push subscribed messages; push the messages to all subscribers
3) URL Format:

http://msdktest.qq.com/profile/subscribe_push?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string the player's unique identification, used in marking the source of MSDK backend information (null if there is no source)
msgId int list of requested message ID, such as 77

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
msg string if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description

6) Example:

POST /profile/subscribe_push?timestamp=1380018062&appid=wxcde873f99466f74a&sig=dc5a6330d54682c88846b1294fbd5fde&openid=A3284A812E%20CA15269F85AE1C2D94EB37&encode=2  HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 101

{
    "appid": "wxcde873f99466f74a",
    "openid": "oGRTijrV0l67hDGN7dstOl8CphN0",
    "msgId": 77
}

//return result
{
"ret":0,
"msg":"success"
}

[WeChat] Subscription clearance

1)interface name:/profile/subscribe_clear
2) Interface description: clear message subscribers
3) URL Format:

http://msdktest.qq.com/profile/subscribe_push?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string the player's unique identification, used in marking the source of MSDK backend information (null if there is no source)
msgId int list of requested message ID, such as 77

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
msg string if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description

6) Example:

POST /profile/subscribe_clear?timestamp=1380018062&appid=wxcde873f99466f74a&sig=dc5a6330d54682c88846b1294fbd5fde&openid=A3284A812E%20CA15269F85AE1C2D94EB37&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 101

{
    "appid": "wxcde873f99466f74a",
    "openid": "oGRTijrV0l67hDGN7dstOl8CphN0",
    "msgId": 77
}

//return result
{
    "ret":0,
    "msg":"success"
}

[WeChat] Elite query

1) interface name:/profile/wxget_eliteinfo
2) Interface description: an interface used to query WeChat elite users
3) URL Format:

http://msdktest.qq.com/profile/wxget_eliteinfo?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
appid string The game's unique identification
openid string a player's unique identification
accessToken string login state

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
msg string if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
data array including:
wx_elite(int): 0 indicates the user is not WeChat elite user, 1 indicates the user is WeChat elite user;
game_elite(int   ):0 indicates the user is not the game's elite user,1 indicates the user is the game's elite user

6) Example:

POST /profile/wxget_eliteinfo?timestamp=1380018062&appid=wxcde873f99466f74a&sig=dc5a6330d54682c88846b1294fbd5fde&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 176
{
    "accessToken": "OezXcEiiBSKSxW0eoylIeLl3C6OgXeyrDnhDI73sCBJYyBcXKXYWTlxU_BAMfu7Rzsr51Nu-CarhcPT6zYlD9FrWRzuA0ccQMgrTGqpao2C-TqXCXdT-DZ44iKkidglb5Q9jQbXnMPrSTck_DUdGMg"
}

//return result
{
    "ret":0,
    "msg":"success",
    "data": {
        "wx_elite": 0,        //0 indicates the user is not WeChat elite user, 1 indicates the user is WeChat elite user
        "game_elite": 0        //0 indicates the user is not the game's elite user,1 indicates the user is the game's elite user   
    }
}

Share

Provide the directed sharing ability for mobile QQ and mobile Qzone.

[Mobile QQ] backend share

1) interface name:/share/qq
2) Interface description: point-to-point directed sharing (share the message to mobile QQ friends and display it in the public account "QQ Mobile Game"). The platform side of this interface no longer accepts game access. If you have special needs, please contact the mobile QQ game center to connect (the game that has been connected can continue to be used).ark share can call /share/qqark interface.

Note:

1.The shared content can be seen only on mobile QQ and can’t be seen on PC QQ.
Receiver: The same user can receive up to 5 pieces of message per day (receive up to 5 pieces from the same user per day) and can receive up to 20 pieces per week

2.Restrictions on sending and receiving messages:
(1) Structured message:
The same pair of numbers can send and receive messages to each other, and the number of interactions is once a day.
The receiver can receive up to 5 pieces of message per day and 20 per week
The sender can send up to 10 pieces of message per day and up to 40 pieces of message per week to different users
(2) ark message:
The receiver can receive up to 5 pieces of message per day and up to 3 pieces of message from the same person
The sender can send up to 30 pieces of message per day and up to 100 pieces of message per week.

3.Messages received through the public account of "QQ Mobile Games" will be issued on the platform side with a delay, and will be issued through the public account at three fixed time periods a day (currently at 12:00, 20:00 and 22:00 every day). A single user can receive up to 3 pieces of public account messages per day.

4.The following steps all need to contact Tencent's corresponding staff to dock.
(1) Provide the image copy and apply for gametag
(2) Input the new appid and gametag into the AMS process
(3) Configure a game center details page for test (later can be changed into an official details page)
(4) After the interface access is completed, verify whether the sharing is successful

3) URL Format:

http://msdktest.qq.com/share/qq?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
openid string a player's unique identification
userip string The user's client ip
act int skip action (1: APP skip; fill in 1 in a unified manner; launch the game)
oauth_consumer_key int appid(Application's unique id at the QQ platform)
dst int msf-mobile QQ(incuding iphone, android qq, etc.); currently, only 1001 can be filled
flag int roaming (0: yes; 1: no. currently, only 1 can be filled)
image_url string the shared image URL (the image size is 128*128; it is needed to ensure the website can be accessed; and the image size shall not exceed 2M)
access_token string login state
src int message source (default value:0)
summary string summary, whose length is not greater than 45 bytes
target_url string URL of the Game Center's details page. Refer to here for details:
https://wiki.ssl.msdk.qq.com/zh_EN/Unity/share.html#Unity_QGameCenter; length can't exceed 256 bytes

Note: Like game_tag, ADTAG in URL is required for the platform to distinguish the type of messages; it must contain one of the following types: (temporarily only four types available in the backend interfaces; the case (uppercase or lowercase) can't be changed)
send heart: ADTAG=gameobj.msg_heart; corresponding game_tag=MSG_HEART_SEND
Invite friends: ADTAG=gameobj.msg_invite; corresponding game_tag=MSG_INVITE
Exceed: ADTAG=gameobj.msg_exceed; corresponding game_tag=MSG_FRIEND_EXCEED
Challenge: ADTAG=gameobj.msg_pvp; corresponding game_tag=MSG_SHARE_FRIEND_PVP
title string Share title, whose length shall not be greater than 45 bytes
fopenids vector or json Json array; the data format is [{"openid":"","type":0}], openid is a friend's openid, and type is fixed to transmit 0. Only support to share messages to one friend
previewText string No need to fill
game_tag string Required. gameTag is used for the platform statistics of share types, such as Heart Send share and Exceed share. Its value is set by the game developer and synchronized to the QQ platform. gameTag now has several values available. Only some of the values are listed for reference. Fill in a proper value after communicating with the QQ platform:
1.Receive the push message through the public account:
"MSG_INVITE":Invite
"MSG_FRIEND_EXCEED":Show off exceeding
"MSG_HEART_SEND":Send heart
"MSG_SHARE_FRIEND_PVP":PVP fight
2.Push and receive structured messages via C2C:
"MSG_RECALL":Recall
"MSG_INVITE_NEW":Invite
3.Ark messages:
"MSG_RECALL_ARK":Recall
"MSG_INVITE_ARK":Invite
"MSG_INVITE_FRIEND_ARK":Get new users

5) Return explanation:

Parameter name Type Description
ret int return code 0: correct, others: failure
msg string if ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description

6) Example:

POST 
/share/qq?timestamp=1380018062&appid=wxcde873f99466f74a&sig=dc5a6330d54682c88846b1294fbd5fde&encode=2 HTTP/1.0
Host:msdktest.qq.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 198

{
    "act": 1,
    "oauth_consumer_key": 100703379,
    "dst": 1001,
    "flag": 1,
    "image_url": "http://mat1.gtimg.com/www/images/qq2012/erweimaVideoPic.png",
    "openid": "A3284A812ECA15269F85AE1C2D94EB37",
    "access_token": "933FE8C9AB9C585D7EABD04373B7155F",
    "src": 0,
    "summary": ""Summary",
    "target_url": "http://gamecenter.qq.com/gcjump?appid={YOUR_APPID}&pf=invite&from=iphoneqq&plat=qq&originuin=111&ADTAG=gameobj.msg_invite
",
    "title": "test by hunter",
    "fopenids": [{"openid":"69FF99F3B17436F2F6621FA158B30549","type":0}],//json array
    "game_tag":"MSG_FRIEND_EXCEED"
}

//return result 
{"ret":0,"msg":"success"}

[QQ] ark backend sharing

1)Interface name: /share/qqark
2)Interface description: QQ ark sharing interface.

Access-related reminders:
1. This interface provides the ark message C2C sharing capability (sharing messages to mobile QQ friends and displaying them in the friend dialog box). Apply for `sceneid` on the Oasis platform, and send ark-type messages. The following procedures all require contact with Tencent's contact persons:
(1)When the access party contacts the QQ platform operation staff to enter the information, the QQ platform operation staff will submit the information to the platform process team to enter it;
(2)After the interface access is completed, verify whether sharing is successful.
2. The shared content can only be seen on mobile QQ, but not on PC QQ.
3. Restrictions on sending and receiving messages:
The receiver can receive up to 5 pieces of messages per day and up to 3 pieces of messages per day from the same person.
The sender can send up to 30 pieces of messages per day and 100 pieces of messages per week.

3)URL format:

http://msdktest.qq.com/share/qqark?timestamp=&appid=&openid=&sig=&encode=2 

4)Description of input parameters:

Parameter name Type Description
appid string The game's appid
openid string The ID of the user who sends the shared message
accessToken string The user's login status
fopenid string The ID of the user who receives the shared message
extra string The ark sharing template protocol on the QQ;in the QQ Oasis platformassignment protocol, remove the comments in the protocol and perform urlencode encryption

5)Return description:

Parameter name Type Description
ret int Return code 0: success, others: failure
msg string When ret is not 0, it means "error code, error prompt"; please refer to the description of error codes for detailed comments

6) Example:

POST 
http://msdktest.qq.com/share/qqark?timestamp=1637581226&appid=100703379&sig=dc5a6330d54682cws451294fbd5fde&encode=2&openid=E2FB89ECD8845569447823EB2AD2F805

{
    "appid":"100703379",
    "openid":"E2FB89ECD88455647823EB2AD2F805",
    "accessToken":"08C59126F6D67E356A119BDA43768A",
    "fopenid":"EFT43BCD8845569447823EBD2F805",
    "extra":"%7B%22app%22%3A%22com.tencent.gamecenter.qqsy%22%2C%22view%22%3A%22picView2%22%2C%22desc%22%3A%22%E6%B8%B8%E6%88%8F%E5%88%86%E4%BA%AB%22%2C%22ver%22%3A%221.0.0.1%22%2C%22config%22%3A%7B%22forward%22%3A0%2C%22type%22%3A%22normal%22%7D%2C%22meta%22%3A%7B%22shareData%22%3A%7B%22appid%22%3A%22100703379%22%2C%22openId%22%3A%22%22%2C%22scene%22%3A%22918%22%2C%22url%22%3A%22%22%2C%22extData%22%3A%7B%7D%7D%7D%7D"
}

//Return result
{"ret":0,"msg":"success"}

Free flow

Query free flow

1) interface name:/freeflow/getinfo
2) Interface description: Query the user's free flow information according to openid, and MSDK backend returns the corresponding free flow information according to the user's subscription relationship.

3) URL Format:

http://msdktest.qq.com/freeflow/getinfo?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
openid string the user's openid

5) Return explanation:

Parameter name Description
ret return code  0:correct,others:failure
msg If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
freeFlowInfo free flow information
ipList string, all the free flow domain names or IPs of the current game
isFree int; is the user a free flow user? 0 represents that the user is not a free flow user; 1 represents that the user is a free flow user
ccType int, the type of the operator to which the user currently subscribes; 0 represents China Unicom, 1 represents China Telecom, and 2 represents China Mobile
ltList string, China Unicom free flow domain names or IPs configured by the current game
dxList string, China Telecom free flow domain names or IPs configured by the current game
ydList string, China Mobile free flow domain names or IPs configured by the current game
expire int, the expiration time of the currently returned information; it represents that the caller needs to query the user's free flow information again after a period of time, namely "expire"

6) Example:

POST /freeflow/getinfo/?timestamp=1104680867&appid=110***&sig=***&openid=23F7F96A4920872EA3CA2DB6CB8EFE04&encode=1 HTTP/1.0
Host:$domain
Content-Type: application/x-www-form-urlencoded

//return result
{
    "ret": 0,
    "msg": "success",
    "freeFlowInfo": {
    "ipList": "***",
    "isFree": 1,
    "ccType": 1,
    "ltList": "***",
    "dxList": "***",
    "ydList": "***",
    "expire": 3600
    }
}

Inquire IP information

1) interface name:/freeflow/get_ccinfo
2) Interface description: Query the details of the IP according to the input IP or the client IP, including operator, region and so on. This interface is only available for the data-free function

3) URL Format:

http://msdktest.qq.com/freeflow/get_ccinfo?timestamp=&appid=&sig=&openid=&encode=2 

4) Parameter description:

Parameter name Type Description
openid string the user's openid
ip string optional; if the field is empty, take the current IP which initiates the network request (the information in this mode may not be accurate; the ip field is usually left blank)

5) Return explanation:

Parameter name Description
ret return code  0:correct,others:failure
msg If ret isn't zero, this means "error code, error prompt"; for detailed comments, see the Error Code Description
data the current ip information
apn string; if it is a gateway, it has a value here; except for this, it is thought to be "wifi"; its default value is "unknown"
city string, city (in China)
country string, Country
district string, district (in China)
extend string, the name of a school or organization or gateway (in China)
nettype string, the network type; default: "unknown"
oper string, operator field
province string, province or municipality (in China)

6) Example:

POST /freeflow/get_ccinfo/?timestamp=1104680867&appid=110***&sig=***&openid=23F7F96A4920872EA3CA2DB6CB8EFE04&encode=1&ip=59.37.125.72 HTTP/1.0
Host:$domain
Content-Type: application/x-www-form-urlencoded

//return result
{
    "ret": 0,
    "msg": "success",
    "data": {
    "apn": "unknown",
    "city": "Shenzhen",
    "country": "China",
    "district": "Nanshan District",
    "extend": "unknown",
    "nettype": "unknown",
    "oper": "China Telecom",
    "province": "Guangdong"
    }