Bind (bind)
The bind API is used to bind third-party channels to the same Player Network account.
Request parameters
| Parameters | Type | Description | Note |
|---|---|---|---|
| token | string | User token generated by Player Network SDK length:40 bytes, see Token for details | Required |
| openid | string | Player Network SDK unique user identifier Defaults to a 64-bit unsigned integer string, but can also support 32-bit. | Required |
| oauth_channelid | number | Channel ID used to call the bind APIFor more information, refer to Login Channels and Channel ID Relationships. | Required |
| bind_channel_info | object | Channel information for the bound channel For more info, see Channel Information. | Required |
| bind_channelid | number | Channel 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
| Parameters | Type | Explanation |
|---|---|---|
| ret | Number | Return code 0: Request successful !=0: Request failed, refer to msg for detailed results |
| msg | string | Result Explanation |
| seq | string | Sequence number of the data stream message |
Response sample
{
ret: 0,
msg: "success",
seq: "1639105985-1191493130-031434-0000571640",
}