Skip to main content

Integration Guide

Supported Channels

Quick Start

caution

The custom account is deprecated, reach out to the Player Network representative to upgrade to LI PASS. To migrate custom accounts to LI PASS, see JSSDK Migration Guide.

Step 1: Install the SDK

Install the SDK from npm or CDN.

// To use LI PASS, make sure the version is later than 1.16.0 
$ npm install @intlsdk/account-api

Step 2: Instantiate the SDK

caution

Set env to the test environment test during the integration testing; set env to the corresponding production environment when launching the game.

The parameters for instantiating different functions differ.

LI PASS Login

const accountApi = new IntlgameAccountApi({
env: "test", // SDK environment
gameID: 11, // Game ID generated in Player Network
appID: "", // APP_ID generated in Player Network
accountPlatType: 131, // LI PASS platform ID
hostCAcc: "https://test-web-pass.intlgame.com", // Test environment: `https://test-web-pass.intlgame.com`, Production environment `https://li-sg.intlgame.com`
langType: "en", // Language
});
ParameterTypeDescriptionRemarks
envstringSDK environment
For more information, see Retrieve cluster information
Required
langTypestringLanguage type
For more information, see Language Type Definition - Custom Account
Required
appIDstringApp ID
ACCOUNT_APP_ID assigned by Player Network Console
Required
accountPlatTypenumberAccount platform type used to identify different account platforms
ACCOUNT_PLAT_TYPE assigned by Player Network Console, value for LI PASS is 131
Required
gameIDnumberPlayer Network unique game IDRequired
hostCAccstring[Required for LI PASS]
Test environemnt: https://test-web-pass.intlgame.com
Production environment: https://li-sg.intlgame.com
Required for LI PASS

Third-party channels

const accountApi = new IntlgameAccountApi({
env: "test", // SDK environment
gameID: 11,
});
ParameterTypeDescriptionRemarks
envstringSDK environment
For more information, see Retrieve cluster information
Required
gameIDnumberPlayer Network unique game IDRequired

Upgrade custom accounts to LI PASS (JSSDK Migration Guide)

Ensure that the game has finished configuring LI PASS from the Player Network control panel.

  1. Upgrade NPM package version according to the steps from Install SDK, or use the new LI PASS JSSDK CDN URL.
  2. Modify the initial configurations of the SDK.
ParameterTypeDescription
envstring[Required]
SDK environment
Pass test for the test environment
For more information, see Retrieve cluster information.
accountPlatTypenumberAccount platform type fixed as 131
hostCAccstringTest environment pass https://test-web-pass.intlgame.com
Production environment pass https://li-sg.intlgame.com
  1. Set 131 for the variable account_plat_type for all APIs.
  2. API changes:
  • New required parameter account for INTLSignin.
  • For the channel information parameter bind_channel_info from the Bind and Map interfaces, if custom account is set as the channel, the account parameter will have to be added. For more information, see Channel Information.

Workflow

Custom account login workflow

Image: Custom account login workflow

Custom account registration workflow

Image: Custom account registration workflow

Third-party account login workflow

Image: Third-party account login workflow

API

For more information on the third-party login APIs, see:

APIFunction
ThirdAuthorizeThird-party authorization
IntlAuthorizePlayer Network account authorization
IntlLogoutLogs out

For more information on the linking APIs, see:

APIFunction
bindLink
unbindUnlink
getBindChannelsByOpenIDGets the list of linked channels based on Player Network SDK OpenID
getBindChannelsByUidGets the list of linked channels based on channel information

For more information on the mapping APIs, see:

APIFunction
mapMaps
unmapUnmaps
queryMapByCAccInfoGets the list of mapped channels based on custom account login information
queryMapByThirdInfoGets the custom account UID based on the login information of the mapped channel