Integration Guide
Supported Channels
Quick Start Guide
Step 1: Install the JavaScript SDK
Install the JavaScript SDK from npm
or CDN
.
- npm
- CDN
$ 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 SDK
caution
Set env
to the test environment https://test.intlgame.com
during the integration testing; set env
to the corresponding production environment when launching the game.
The parameters for instantiating different functions differ.
Custom account
const accountApi = new IntlgameAccountApi({
env: "test", // SDK environment
langType: "en", //Language
appID: "", //Custom account App ID
accountPlatType: 52, //Custom account channel ID
gameID: 11,
});
Parameter | Type | Description | Remark |
---|---|---|---|
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 | The platform type for custom account ACCOUNT_PLAT_TYPE assigned by Player Network Console | Required |
gameID | number | Player Network unique game ID | Required |
Third-party channels
const accountApi = new IntlgameAccountApi({
env: "test", // SDK environment
gameID: 11,
});
Parameter | Type | Description | Remark |
---|---|---|---|
env | string | SDK environment For more information, see Retrieve cluster information | Required |
gameID | number | Player Network unique game ID | Required |
API
For more information on the friend APIs, see:
API | Function |
---|---|
share | Share |