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 | Call bind API channel IDFor more information, see Login Channels and Channel ID Mapping. | Required |
| bind_channel_info | object | Channel information for the bound channel . For more information, see Channel Information. | Required |
| bind_channelid | number | Channel 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
| 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 | Data Stream Message Serial Number |
Response sample
{
ret: 0,
msg: "success",
seq: "1639105985-1191493130-031434-0000571640",
}