Skip to main content

Bind (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_channelidnumberChannel ID used to call the bind API
For more information, refer to Login Channels and Channel ID Relationships.
Required
bind_channel_infoobjectChannel information for the bound channel
For more info, see Channel Information.
Required
bind_channelidnumberChannel ID of the bound channel
For more information, refer to Login Channels and Channel ID Relationships.
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
seqstringSequence number of the data stream message

Response sample

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