Skip to main content

GetBindChannelsByOpenID

The getBindChannelsByOpenID API is used to get the list of linked channels based on Player Network SDK OpenID.

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
channel_idnumberPlayer Network SDK authorized channel ID
For more information, see Login Channel and ChannelID Relationship.
Required

Request Sample

accountApi.getBindChannelsByOpenID({
openid:'xxx',
token:'xxxx',
channel_id:4,
}).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
bind_listarrayList of linked channels
seqstringSequence number of the message in the data stream

bind_list

ParameterTypeDescription
channel_infoobjectChannel information of the linked channel.
The information differs for each channel. For more information, see Channel Information.
channelidnumberChannel ID of the linked channel.
For more information, see Login Channel and ChannelID Relationship.
picture_urlstringURL of the avatar
user_namestringUsername of the linked channel

Response Sample

{
ret: 0,
msg: "success",
bind_list: [
{
channel_info: {},
channelid: 28,
picture_url: "https://www.google.com/Images/profileA.png",
user_name: "user"
},
{
channel_info: {},
channelid: 4,
picture_url: "https://www.google.com/Images/profileB.png",
user_name: "user"
}
],
seq: "1639105985-1191493130-031434-0000571640",
}