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
.
- npm
- CDN
// To use LI PASS, make sure the version is later than 1.16.0
$ npm install @intlsdk/account-api
// SDK production version package
<script src="https://common-web.intlgame.com/sdk-cdn/account-api/latest/index.umd.js"></script>
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
});
Parameter | Type | Description | Remarks |
---|---|---|---|
env | string | SDK environment For more information, see Retrieve cluster information | Required |
langType | string | Language type For more information, see Language Type Definition - Custom Account | Required |
appID | string | App ID ACCOUNT_APP_ID assigned by Player Network Console | Required |
accountPlatType | number | Account platform type used to identify different account platforms ACCOUNT_PLAT_TYPE assigned by Player Network Console, value for LI PASS is 131 | Required |
gameID | number | Player Network unique game ID | Required |
hostCAcc | string | [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,
});
Parameter | Type | Description | Remarks |
---|---|---|---|
env | string | SDK environment For more information, see Retrieve cluster information | Required |
gameID | number | Player Network unique game ID | Required |
Upgrade custom accounts to LI PASS (JSSDK Migration Guide)
Ensure that the game has finished configuring LI PASS from the Player Network control panel.
- Upgrade NPM package version according to the steps from Install SDK, or use the new LI PASS JSSDK CDN URL.
- Modify the initial configurations of the SDK.
Parameter | Type | Description |
---|---|---|
env | string | [Required] SDK environment Pass test for the test environmentFor more information, see Retrieve cluster information. |
accountPlatType | number | Account platform type fixed as 131 |
hostCAcc | string | Test environment pass https://test-web-pass.intlgame.com Production environment pass https://li-sg.intlgame.com |
- Set 131 for the variable
account_plat_type
for all APIs. - API changes:
- New required parameter
account
forINTLSignin
. - For the channel information parameter
bind_channel_info
from theBind
andMap
interfaces, if custom account is set as the channel, theaccount
parameter will have to be added. For more information, see Channel Information.
Workflow
Custom account login workflow
Custom account registration workflow
Third-party account login workflow
API
For more information on the third-party login APIs, see:
API | Function |
---|---|
ThirdAuthorize | Third-party authorization |
IntlAuthorize | Player Network account authorization |
IntlLogout | Logs out |
For more information on the linking APIs, see:
API | Function |
---|---|
bind | Link |
unbind | Unlink |
getBindChannelsByOpenID | Gets the list of linked channels based on Player Network SDK OpenID |
getBindChannelsByUid | Gets the list of linked channels based on channel information |
For more information on the mapping APIs, see:
API | Function |
---|---|
map | Maps |
unmap | Unmaps |
queryMapByCAccInfo | Gets the list of mapped channels based on custom account login information |
queryMapByThirdInfo | Gets the custom account UID based on the login information of the mapped channel |