Skip to main content

IntlAuthorize

The IntlAuthorize API is used to authorize Player Network account login through the authorization information of the third-party channels.

Request Parameter

ParameterTypeDescriptionRemark
third_typestringThird-party channels:
apple
discord
epic
facebook
fbInstantGame
garena
google
line
ps5
steam
twitch
twitter
vk
xbox
Required
channel_infoobjectChannel information of the login channel
For more information, see Channel Information
Required

Request Sample

accountApi.IntlAuthorize({
third_type: 'facebook',
channel_info: {
access_token: "EAAI2lTrXAZBwBAC"
}
}).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
tokenstringPlayer Network SDK user authorization token
Length: 40 bytes, see Token
openidstringPlayer Network SDK unique user ID
The default value is 64-bit unsigned integer string, 32-bit string is also supported.
token_expire_timeint64Player Network SDK token expiration time
Unix time
user_namestringUnique username used for login
birthdaystringUser birthday
channel_infoobjectChannel information of the login channel
For more information, see Channel Information.
del_account_statusnumberAccount deletion status
-1: Query failed
0: No record of revoking any account (email and phone account) deletion request
1: Cooling-off period before deleting the account
2: Account deleted successfully
3: Deleting the account
4: Account deletion failed
seqstringSequence number of the message in the data stream

Response Sample

{
birthday: "",
channel_info: {
access_token:"xxxxx",
expire_ts: 1641527900,
}
first_login: 0,
gender: 0,
msg: "success",
need_name_auth: false,
openid: "xxxx",
pf: "facebook_fb-00000000-web-00000000-fb-xxxxxxxxxxxxxxxx-419213088809929925",
pf_key: "6cc9bxxxxxxxxxxxxxxxxxx826",
picture_url: "https://www.google.com/Images/profileA.png",
ret: 0,
seq: "1638935899-1006943754-018668-0000656615",
token: "xxx",
token_expire_time: 1641527900,
del_account_status: 0,
uid: "xxxx",
user_name: "user",
}