Access Guide
Quick Start
Step 1: Import SDK
caution
During the project tuning phase, you can import the SDK debug version package, which is only used for integration testing.When the project goes online, the official version package of the SDK must be imported.
Currently, both npm package and CDN methods are supported.
- npm
- CDN
$ npm install @intlsdk/account-api
// SDK Debug Version Package
<script src="https://test-common-web.intlgame.com/sdk-cdn/account-api/latest/index.umd.js"></script>
// SDK Official Version Package
<script src="https://common-web.intlgame.com/sdk-cdn/account-api/latest/index.umd.js"></script>
Step 2: Use the SDK
caution
During integration testing, set env to test environment https://test.intlgame.com; when launching the game, set env to the corresponding official environment.
Different functions have different parameters.
Self-Built Account Related
const accountApi = new IntlgameAccountApi({
env: "test", // environment where the SDK operates
langType: "en", // language
appID: "", // self-built account app ID
accountPlatType: 52, // self-built account platform ID
gameID: 11,
});
| Parameters | Type | Explanation | Remarks |
|---|---|---|---|
| env | string | SDK Environment For more information, see Retrieve Deployment Cluster Information. | Required |
| langType | String | Language type For more information, you can check Language Type Definition-Self-Built Account | Required |
| appID | string | App ID ACCOUNT_APP_ID assigned by the Player Network Console. | Mandatory |
| accountPlatType | number | Self-built account platform type, used to identify different account platforms ACCOUNT_PLAT_TYPE assigned by the Player Network Console. | Required |
| gameID | number | Player Network Game Unique ID | Required |
Third-Party Channel Related
const accountApi = new IntlgameAccountApi({
env: "test", //environment where the SDK runs, see "env description" below
gameID: 11,
});
| Parameters | typology | Explanation | Notes |
|---|---|---|---|
| env | String | SDK Environment For more information, see Retrieve Deployment Cluster Information. | Required |
| gameID | number | Player Network Game Unique ID | Mandatory |
API
For more information on LBS API, see:
| API | Function Definition |
|---|---|
| queryMyRegion | Get country and region information based on IP |