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
uidinputted is the user id provided by Facebook. - With the Multi-store Channel Package feature integrated: The
uidinputted 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.
| Parameters | Type | Description | Remark |
|---|---|---|---|
| uid | string | Third-party channel user ID | Required |
| token | string | token | Required |
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
| Parameters | Type | Description |
|---|---|---|
| ret | int | Return code 0: Success Other: Failure |
| msg | string | Detailed Result |
| openid | string | Third-party channel user ID |
Return Sample
{
"ret": 0,
"msg": "success",
"openid": "xxxxxxxxxxxxxxxxxxxx",
"uid": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"seq": "xxxxxxxxxx-xxxxxxxxxx-xxxxxx-xxxxxxxxxx"
}