Skip to main content

Web SDK Configuration

Initialization ParametersTypeDescriptionRemarks
envstringSDK environment, test is the testing environment.
For more information, see Get Deployment Cluster Information
Required
gameIDnumberGame IDRequired
appIDstringApp ID, assigned by Player Network Console as ACCOUNT_APP_IDRequired
WebIDstringWeb ID assigned by Player Network ConsoleOptional
configobjectAdvanced configurationOptional

config

note

如果您已在 Player Network 控制台创建 LI PASS Web 的配置,只需在控制台选择配置即可,无需手动配置 config 中的大部分参数。Player Network 控制台下发的配置优先级高于 config

The following configurations are not supported on the Player Network Console:

  • langType - Not supported, can be passed during initialization as needed
  • crossGameLink - No configuration needed, automatically delivered
Parameter Type Description Remarks
isMobile boolean Whether to display mobile UI Optional
Default: false (shows PC UI)

If you want to detect the device environment yourself to dynamically set the value of isMobile, set Web Layout in Player Network Console to Custom Configuration
socialList string[] Supported third-party login channels list
For example: facebook, twitter, google, apple, line, steam, epic, ps5, discord, vk, twitch, qq, wechat
Optional
Default: []
socialParams object Additional configuration for third-party login channels Required for Apple and Kakao v3
Default: {}
renderMode string Display mode
inline: normal mode
modal: modal dialog mode
Optional
Default: inline
loginWithCode object Verification code login configuration Optional
Default: { enable: true, registerType: 'manual'}
loginWithPwd object Password login configuration Optional
Default: { enable: true, registerType: 'manual'}
procedureSwitch object Workflow switches Optional
Default: { region: false, adultStatus: false, agreement: false, registerPassword: 'onDemand'}
serviceIntro boolean Enable LI PASS service introduction entry Optional
Default: false
langType string Default language, see Language List Optional
Default: en

Not supported in Player Network Console
crossGameLink boolean Enable cross-game account linkage Optional
Default: false

No configuration needed, automatically delivered

socialParams

ParameterTypeDescriptionRemarks
appleAppIdstringApple channel Web app IDRequired for Apple channel
platformnumberSpecify Garena login method
1: Garena
3: Facebook
8: Google
10: Apple
11: Twitter
Optional for Garena channel
kakaov3AppIdstringKakao app IDRequired for Kakao v3 channel
kakaov3JsKeystringKakao Javascript keyRequired for Kakao v3 channel

loginWithCode

ParameterTypeDescriptionRemarksDefault value
enablebooleanEnable verification code loginOptionaltrue
registerTypestringRegistration type
manual: only manual registration allowed
auto: unregistered users can use verification code login for automatic registration
disabled: disable registration, only existing users can log in
Optionalmanual

loginWithPwd

ParameterTypeDescriptionRemarksDefault value
enablebooleanEnable password loginOptionaltrue
registerTypestringRegistration type
manual: only manual registration allowed
disabled: disable registration, only existing users can log in
Optionalmanual

procedureSwitch

Wrong format: columns are not match