Skip to main content

Bind

The bind API is used to bind third-party channels to the same Player Network account.

Request parameters​

ParametersTypeDescriptionNote
tokenstringUser token generated by Player Network SDK
length: 40 bytes, see Token for details
Required
openidstringPlayer Network SDK unique user identifier
Defaults to a 64-bit unsigned integer string, but can also support 32-bit.
Required
oauth_channelidnumberCall bind API channel ID
For more information, see Login Channels and Channel ID Mapping.
Required
bind_channel_infoobjectChannel information for the bound channel
. For more information, see Channel Information.
Required
bind_channelidnumberChannel ID for the bound channel
For more information, see Relationship Between Login Channels and Channel IDs.
Required

Request sample​

accountApi.bind({
openid: 'xxx',
token: 'xxxx',
oauth_channelid: 4,
bind_channelid: 9,
bind_channel_info: {
oauth_token: "xxxxx",
oauth_secret: "xxxxxx",
},
}).then(
(res) => {
console.log(res);
}
);

Response parameters​

ParametersTypeExplanation
retnumberReturn code
0: Request successful
!=0: Request failed, refer to msg for detailed results
msgstringResult Explanation
seqstringData Stream Message Serial Number

Response sample​

{
ret: 0,
msg: "success",
seq: "1639105985-1191493130-031434-0000571640",
}