CustomSignUp
public BackendReturnObject CustomSignUp(string id, string password);
public BackendReturnObject CustomSignUp(string id, string password, string etc);
Parameters
Value | Type | Description |
---|---|---|
id | string | ID required for custom account sign-up |
password | string | Password required for custom sign-up |
etc | string | (Optional) Information you wish to save in addition |
Description
The user manually selects the ID and password to sign up.
- Accounts created through custom sign-up can be changed to Google/Apple/Facebook federation accounts.
Example
Synchronous
BackendReturnObject bro = Backend.BMember.CustomSignUp("id" , "password");
if(bro.IsSuccess())
{
Debug.Log("Sign-up successful");
}
Asynchronous
Backend.BMember.CustomSignUp("id", "password", callback => {
if(callback.IsSuccess())
{
Debug.Log("Sign-up successful");
}
});
SendQueue
SendQueue.Enqueue(Backend.BMember.CustomSignUp, "id", "password", callback => {
if(callback.IsSuccess())
{
Debug.Log("Sign-up successful");
}
});
ReturnCase
Success cases
When the sign-up is successful
statusCode : 201
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 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
code : 403100
errorMessage : 20240426092307fc5ac478c is blocked
errorData : {
deviceUniqueId : 20240426092307fc5ac478c
}
If the device is blocked, you can check the following error data.
- Code : Unique ID for the error case
- ErrorMessage : Details of that error
- ErrorData : Detailed data related to the error
Error use example
var callback = Backend.BMember.CustomSignUp("a0", "a0");
Debug.Log(
if (callback.IsDeviceBlockError())
{
StringBuilder returnString = new StringBuilder();
returnString.Append("StatusCode : ").Append(callback.GetStatusCode()).AppendLine();
returnString.Append("ErrorCode : ").Append(callback.GetErrorCode()).AppendLine();
returnString.Append("Message : ").Append(callback.GetMessage()).AppendLine();
returnString.Append("Code : ").Append(callback.GetCode()).AppendLine();
returnString.Append("ErrorMessage : ").Append(callback.GetErrorMessage()).AppendLine();
returnString.Append("errorData(deviceUniqueId)").Append(callback.GetErrorData()["deviceUniqueId"].ToString()).AppendLine();
Debug.Log(returnString.ToString());
}
)
When there is a duplicated customId
statusCode : 409
errorCode : DuplicatedParameterException
message : Duplicated customId, Duplicated customId