Skip to main content

Query UID by OpenID

POST /v2/profile/openid2uid

This endpoint enables the game to get the third party channel ID of the user from Player Network SDK OpenID.

note

If you have integrated the multi-store packages, and need to use this interface to query the UID of Facebook, the queried UID will change:

  • If the multi-store channel package is not integrated: the returned UID is the user id provided by Facebook.
  • If the multi-store channel package is integrated: the returned UID may be the token_for_business provided by Facebook.

If you have integrated the multi-store channel package using the Facebook UID, reach out to the Player Network representative.

Request parameters

For query parameters, see Query parameters.

ParameterTypeDescriptionRemark
openidstringUnique user IDRequired
tokenstringtokenRequired
f_openidstringgopenid of a friend on the same channel
If gopenid exists, return the corresponding UID. Otherwise, return the corresponding UID of the specified openid.
Optional

Request sample

curl -sS -X POST -H 'Content-Type: application/json' 'https://test.intlgame.com/v2/profile/openid2uid?channelid=3&gameid=11&os=1&sdk_version=2.0&seq=&source=1&ts=1609854540&sig=347acfbe3ec5c7c4ca89bffae7d467ad' -d '{"openid":"11954373454472816990","token":"b60537901dcad5002574724e25b0009048d21357"}'

Response parameters

ParameterTypeDescription
retintReturn code
0: success
others: failure
msgstringResponse message
uidstringThird-party channel user ID

Response sample

{
"ret": 0,
"msg": "success",
"openid": "xxxxxxxxxxxxxxxx",
"uid": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"seq": "xxxxxxxxxx-xxxxxxxxxx-xxxxx-xxxxxxxxxx"
}