Skip to main content

Map

The map API is used to associate third-party accounts with the custom account. You must have an existing custom account when calling this API.

Request Parameter

ParameterTypeDescriptionRemark
third_typestringThird-party channels:
discord
epic
facebook
google
ps5
steam
twitch
Required
channel_infoobjectChannel information of the third-party account
For more information, see Channel Information.
Required
sacc_channel_infoobjectChannel information of the custom accountRequired

sacc_channel_info

ParameterTypeDescription
tokenstringUser authorization token for custom account
Length: 40 bytes, see Token
openidstringCustom account UID
account_plat_typenumberAccount platform type used to differentiate different custom account platforms
ACCOUNT_PLAT_TYPE assigned by Player Network Console

Request Sample

accountApi.map({
third_type:'facebook',
channel_info:{
access_token:"EAAI2lTrXAZBwBAEWdBW...LUdVblu9qPwZDZD"
},
sacc_channel_info:{
token:"vOrEZi@nAJ8CZIC...u7Phiu_r7HfcHuQ==",
openid:"4966271191",
account_plat_type:25
}
}).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",
}