Enfusion Script API
Loading...
Searching...
No Matches
BohemiaAccountApi Interface Reference

This API is used for linking user Game Identity with his Bohemia Account. More...

Static Public Member Functions

static proto void Link (notnull BackendCallback callback, string email, string password, string twoFactorToken)
 Will request link of Bohemia Account with current GameIdentity of client.
 
static proto void Unlink (notnull BackendCallback callback)
 Will request unlink of Bohemia Account from current Game Identity of client.
 
static proto int GetSecondsUntilAccountUnlockTime ()
 Returns remaining time in seconds until locked account from last attempt is unlocked.
 
static proto bool IsLinked ()
 Returns true if current Game Identity of client is already linked with Bohemia Account.
 
static proto string GetEmail ()
 Returns email of linked Bohemia Account.
 
static proto string GetName ()
 Returns username of linked Bohemia Account.
 

Detailed Description

This API is used for linking user Game Identity with his Bohemia Account.

Bohemia Account can be linked only to one GameIdentity at once. Attempts to link with additional GameIdentity will result in failure.

Member Function Documentation

◆ GetEmail()

static proto string BohemiaAccountApi.GetEmail ( )
static

Returns email of linked Bohemia Account.

Note
When called in modded game this method will always return censored email. In Workbench it can return uncensored email even with mods if user gives his consent.

◆ GetName()

static proto string BohemiaAccountApi.GetName ( )
static

Returns username of linked Bohemia Account.

◆ GetSecondsUntilAccountUnlockTime()

static proto int BohemiaAccountApi.GetSecondsUntilAccountUnlockTime ( )
static

Returns remaining time in seconds until locked account from last attempt is unlocked.

Will reset if there is attempt to link with different account or if links returns different error than account locked.

◆ IsLinked()

static proto bool BohemiaAccountApi.IsLinked ( )
static

Returns true if current Game Identity of client is already linked with Bohemia Account.

◆ Link()

static proto void BohemiaAccountApi.Link ( notnull BackendCallback callback,
string email,
string password,
string twoFactorToken )
static

Will request link of Bohemia Account with current GameIdentity of client.

Parameters
callbackcallback where you will receive result when request finishes.
emailemail address of Bohemia Account.
passwordpassword of Bohemia Account.
twoFactorTokentoken for two-factor-authentication. Can be left empty since it is required only if link fails with EApiCode.EACODE_ERROR_USER_MISSING_2FA.
Note
These error ApiCodes are related to linking of Bohemia Accounts and should be properly handled:

◆ Unlink()

static proto void BohemiaAccountApi.Unlink ( notnull BackendCallback callback)
static

Will request unlink of Bohemia Account from current Game Identity of client.


The documentation for this interface was generated from the following file: