Skip to main content

Query OpenID by UID

POST /v2/profile/uid2openid

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

note

If you have integrated the multi-store packages, and need to use this interface to query the OpenID from the uid of Facebook, the required uid will change:

  • If the multi-store channel package is not integrated: the required uid is the user id provided by Facebook.
  • If the multi-store channel package is integrated: the required 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
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"}'

Response parameters

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

Response sample

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