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
| Parameters | Type | Description | Note |
|---|---|---|---|
| third_type | string | Third-party channel type: discord epic ps5 steam twitch | Required |
| channel_info | object | Channel information for third-party accounts For more information, see Channel Info. | Required |
| sacc_channel_info | object | Login information for self-built accounts | Required |
sacc_channel_info
| Parameters | Type | Description |
|---|---|---|
| token | string | Authorization token for self-built accounts Length: 40 bytes, see Token for details |
| openid | string | UID of the self-built account |
| account_plat_type | number | Self-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
| Parameter | Type | Description |
|---|---|---|
| ret | number | Return code 0: Request successful !=0: Request failed, see msg for detailed result description |
| msg | string | Result description |
| seq | string | Message sequence number for the data stream |
Return Sample
{
ret: 0,
msg: "success",
seq: "1639105985-1191493130-031434-0000571640",
}