Query Third-Party Channel Account ID
POST /v2/profile/openid2uid
This interface allows the game to obtain the third-party channel ID of the user from the Player Network SDK OpenID.
note
If you have integrated the Multi-Store Channel Package feature and need to use this interface to query the uid for the Facebook channel, the queried uid will be different:
- Without Multi-store Channel Package integration: The returned
uidis the user id provided by Facebook. - With Multi-store Channel Package integration: The returned
uidmay be the 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 |
|---|---|---|---|
| openid | string | Unique identifier for Player Network SDK user | Required |
| token | string | token | Required |
| f_openid | string | Friend's openid on the same channel If gopenid exists, return the corresponding uid.Otherwise, return the uid corresponding to 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"}'
Return Parameters
| Parameters | Type | Description |
|---|---|---|
| ret | int | Return code 0: Success Other: Failure |
| msg | string | Detailed Result |
| uid | string | Third-party channel user ID |
Return Sample
{
"ret": 0,
"msg": "success",
"openid": "xxxxxxxxxxxxxxxx",
"uid": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"seq": "xxxxxxxxxx-xxxxxxxxxx-xxxxx-xxxxxxxxxx"
}