Skip to main content

Query OpenID by UID

POST /v2/profile/uid2openid

This interface enables the game to obtain the user's Player Network SDK OpenID from a third-party channel ID.

note

If you have integrated the Multi-Store Package feature and need to use this interface to query the OpenID by Facebook channel's uid, the uid used will be different:

  • Without integrating the Multi-store Channel Package feature: The uid inputted is the user id provided by Facebook.
  • With the Multi-store Channel Package feature integrated: The uid inputted may be token_for_business provided by Facebook.

If using Facebook uid when integrating the Multi-store Channel Package, please contact Player Network Assistant.

Request parameters

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

ParametersTypeDescriptionRemark
uidstringThird-party channel user IDRequired
tokenstringtokenRequired

Request sample

curl -sS -X POST -H 'Content-Type: application/json' 'https://test.intlgame.com/v2/profile/uid2openid?channelid=3&gameid=11&os=1&sdk_version=2.0&seq=&source=1&ts=1609854540&sig=51d647a3a51b46e5099bb6c9ae85296d' -d '{"uid":"32cb7b954106e938247fceda721e1927","token":"b60537901dcad5002574724e25b0009048d21357"}'

Return Parameters

ParametersTypeDescription
retintReturn code
0: Success
Other: Failure
msgstringDetailed Result
openidstringThird-party channel user ID

Return Sample

{
"ret": 0,
"msg": "success",
"openid": "xxxxxxxxxxxxxxxxxxxx",
"uid": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"seq": "xxxxxxxxxx-xxxxxxxxxx-xxxxxx-xxxxxxxxxx"
}