Skip to main content

Retrieve the friend list from third-party channels

POST /v2/friend/friend_list

This interface enables games to retrieve the player's friend list from third-party channels.

note

Currently, this interface only supports Facebook, Garena, PS5, QQ, Steam, WeChat, and VK.In multi-channel scenarios, due to channel restrictions, Facebook and WeChat channels can only retrieve friends who share the same app ID.

For rate limit information, see Rate Limit.

Request parameters

For the query parameters for interface calls, see Query Parameters.

ParametersTypeDescriptionNote
openidstringPlayer Network SDK user identificationRequired
tokenstringPlayer Network SDK user login stateRequired

Request Sample

curl -sS -X POST -H 'Content-Type: application/json' 'https://test.intlgame.com/v2/friend/friend_list?channelid=21&gameid=11&os=5&source=0&ts=1590485133&sdk_version=2.0&sig=b0131f8a844dcdb1044a87ea2a6d5f0d' -d '{"token":"b71de93cc578b442f129e2aa445655828386fec9","openid":"5642128712278250897"}'

Return Parameters

ParametersTypeDescription
retintReturn code
0: Success
Other: Failure
msgstringDetails of the result
listsarrayFriend list from the same third-party channel. If empty, this field is not returned.
is_lostintWhen is_lost=1, the obtained data is downgraded.Do not cache data.
Use cached data first if available.Only use current data if no cached data is available.
seqstringSequence number carried by the request URL

lists

Return FieldsNotes
openidReturned by all channels
user_nameConfigurable to not return for WeChat, QQ
Not returned during restricted Facebook login
genderNo channel returns this currently
picture_urlConfigurable to not return for WeChat, QQ
Not returned during restricted Facebook login

Example:

lists {
string openid; // User identification ID
string user_name; // User name
uint gender; // Gender. 1: Male; 2: Female; 0: Not set
string picture_url; // Profile picture URL
}

Return Sample

{
"ret": 0,
"msg": "SUCCESS",
"is_lost": 0,
"lists": [
{
"openid": "9556832059718695202"
},
{
"openid": "6045537030682645917"
},
{
"openid": "8620320801333649204"
},
{
"openid": "18062972584926121462"
}
],
"seq": "1590992804-0266701833-005087-0000003295"
}

Rate Limit

The list returned by this interface is filtered from the third-party channel's interface friend list. Callers should be aware of channel restrictions, for instance:

  • Facebook: Hourly request limit is equal to daily active users * 200.
    For more information, see Traffic Limit.
  • VK:
    • Each client can send up to 3 requests per second to API methods;
    • Maximum number of server requests depends on the number of app users:
      • If the number of app users is less than 10,000, the limit is 5 requests per second;
      • Up to 100,000 users allows 8 requests per second;
      • Up to 1 million users, the limit is 20 requests per second;
      • Over 1 million users, the limit is 35 requests per second;
    • For more information, see API Requests.
  • Steam: Each app can make 100,000 calls per day to the Steam Web API
    For more information, see Steam Web API Terms of Use.

Channel restrictions may change at any time, so specific limitations are according to the respective channel's official documentation.