Skip to main content

Mapping (map)

The map API is used to link third-party accounts with self-built accounts.A pre-existing self-built account is required when calling the API.

Request parameters

ParametersTypeDescriptionNote
third_typestringThird-party channel type:
discord
epic
facebook
google
ps5
steam
twitch
Required
channel_infoobjectChannel information for third-party accounts
For more information, see Channel Info.
Required
sacc_channel_infoobjectLogin information for self-built accountsRequired

sacc_channel_info

ParametersTypeDescription
tokenstringAuthorization token for self-built accounts
Length: 40 bytes, see Token for details
openidstringUID of the self-built account
account_plat_typenumberSelf-built account platform type, used to identify different account platforms.
ACCOUNT_PLAT_TYPE assigned by Player Network Console.

Request example

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);
}
);

Return Parameters

ParameterTypeDescription
retnumberReturn code
0: Request successful
!=0: Request failed, see msg for detailed result description
msgstringResult description
seqstringMessage sequence number for the data stream

Return Sample

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