ThirdAuthorize
The ThirdAuthorize
API is used to get the login authorization information of the third-party login channel. It is often used for Player Network account login operation. Different third-party channel returns different tokens, see Channel Information for more information.
Request Parameter
Parameter | Type | Description | Remark |
---|---|---|---|
third_type | string | Third-party channels: apple discord epic fbInstantGame garena kakaov3 line ps5 steam twitch vk xbox | Required |
extra | object | Configuration required when logging in through some third-party channels See extra for detailed configurations | Optional |
extra
Parameter | Type | Description | Remark |
---|---|---|---|
appleAppId | string | Web app ID for Apple | Required for apple |
platform | number | Specifies the login method for Garena 1: Garena 3: Facebook 8: Google 10: Apple 11: Twitter | Optional for Garena |
kakaov3AppId | number | Kakao app ID | Required for Kakao v3 |
kakaov3JsKey | string | Kakao Javascript key | Required for Kakao v3 |
wechatAuthType | number | 0: WeChat QR code login, 1: WeChat web authorization Default: 0 | Required for WeChat web authorization |
wechatAppId | string | WeChat AppId | Required for WeChat web authorization |
wechatScopeType | number | WeChat scope type, 0: snsapi_login, 1: snsapi_userinfo, 2: snsapi_base | Optional for WeChat web authorization |
Request Sample
accountApi.ThirdAuthorize({
third_type: 'kakaov3',
extra: {
kakaov3AppId: 111, // Required for kakao v3 login
kakaov3JsKey: 'xxx', // Required for kakao v3 login
}
}).then(
(res) => {
console.log(res);
});
accountApi.ThirdAuthorize({
third_type: 'apple',
extra: {
appleAppId: 'xxxxx', // Required for apple login
}
}).then(
(res) => {
console.log(res);
});
Response Parameter
Parameter | Type | Description |
---|---|---|
ret | number | Return code 0: Request success, parse related returned field information. !=0: Request failure, check msg for the detailed return message. |
msg | string | Return message |
access_token | string | Access token for the third-party channel Different third-party channel returns different tokens, see Channel Information for more information. |
Response Sample
{
msg: "Success",
ret: 0,
access_token: "xxxxx",
}