Skip to main content

Bind

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

Request Parameter

ParameterTypeDescriptionRemark
tokenstringPlayer Network SDK user authorization token
Length: 40 bytes, see Token
Required
openidstringPlayer Network SDK unique user ID
The default value is 64-bit unsigned integer string, 32-bit string is also supported.
Required
oauth_channelidnumberChannel ID of the channel that called the bind API
For more information, see Login Channel and ChannelID Relationship.
Required
bind_channel_infoobjectChannel information of the linked channel
For more information, see Channel Information.
Required
bind_channelidnumberChannel ID of the linked channel
For more information, see Login Channel and ChannelID Relationship.
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 Parameter

ParameterTypeDescription
retnumberReturn code
0: Request success, parse related returned field information.
!=0: Request failure, check msg for the detailed return message.
msgstringReturn message
seqstringSequence number of the message in the data stream

Response Sample

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