Skip to main content
Version: SDK-5.11.4

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
message : Success

Error cases

When the device information is 'null'
statusCode : 400
errorCode : UndefinedParameterException
message : undefined device_unique_id, device_unique_id cannot be checked

When the ID does not exist
statusCode : 401
errorCode : BadUnauthorizedException
message : bad customId, Invalid customId

When the password does not match
statusCode : 401
errorCode : BadUnauthorizedException
message : bad customPassword, Invalid customPassword

When the project status is 'Maintenance'
statusCode : 401
errorCode : BadUnauthorizedException
message : bad serverStatus: maintenance, Invalid serverStatus: maintenance

When the device is blocked
statusCode : 403
errorCode : ForbiddenException
message : Forbidden blocked device, Blocked device

When logging in using the ID created with custom sign-up
statusCode : 404
errorCode : NotFoundException
message : user not found, user cannot be found