Skip to main content
Version: 5.11.8

LoginAccount

public BackendReturnObject LoginAccount(string id, string password);

Parameters

ValueTypeDescription
idstringSigned-up unique user ID
passwordstringPassword used for login

Description

Log into the user account that has been created in advance.

  • You cannot log in using the ID created using CustomSignUp.
  • If the account login is completed, you cannot use BACKND functions excluding character-related methods.

    If you attempt to call BACKND Base's functions after completing the account (user) login but not going through the character login, the following exception occurs: The client has not logged in yet. Please log in first(0).

Example

Synchronous

BackendReturnObject bro = Backend.MultiCharacter.Account.LoginAccount("id" , "password");
if(bro.IsSuccess()) {
Debug.Log("Account login successful");
}

Asynchronous

BackendReturnObject bro = Backend.MultiCharacter.Account.LoginAccount("id", "password", callback => {
if(callback.IsSuccess()) {
Debug.Log("Account login successful");
}
});

SendQueue

SendQueue.Enqueue(BackendReturnObject bro = Backend.MultiCharacter.Account.LoginAccount, "id", "password", callback => {
if(callback.IsSuccess()) {
Debug.Log("Account login successful");
}
});

ReturnCase

Success cases

When the sign-up is successful
statusCode : 200

Error cases

When the device information is 'null'
statusCode : 400
errorCode : UndefinedParameterException

When the ID does not exist
statusCode : 401
errorCode : BadUnauthorizedException

When the password does not match
statusCode : 401
errorCode : BadUnauthorizedException

When the project status is 'Maintenance'
statusCode : 401
errorCode : BadUnauthorizedException

When the device is blocked
statusCode : 403
errorCode : ForbiddenException

When logging in using the ID created with custom sign-up
statusCode : 404
errorCode : NotFoundException