Skip to content

User Registration

The user registration API can be used to create user accounts in the application. A registration request must provide a user object as a collection of key/value properties. The collection must contain all the required properties which must include a property marked as identity as well as the "password" property. The default identity property is "email", however, it can be changed in Backendless Console. Additionally, the "email" property is required if the application is configured to confirm email addresses for the registered users.

When this API is used to convert a guest user account to a regular registered user, the BackendlessUser argument must have the objectId property set to the value returned from the Guest Login API.

- (void)registerUserWithUser:(BackendlessUser * _Nonnull)user responseHandler:^(BackendlessUser * _Nonnull)responseHandler errorHandler:^(Fault * _Nonnull)errorHandler;
func registerUser(user: BackendlessUser, responseHandler: ((BackendlessUser) -> Void)!, errorHandler: ((Fault) -> Void)!)

Return value

The return value is a BackendlessUser object representing the registered user. The objectId property contains a value assigned by the server. The registration API does not login the user.

Error Codes

The following errors may occur during User Registration API calls. See the Error Handling section for details on how to retrieve the error code when the server returns an error.

Error Code
Invalid application info (application id or api key)
User registration is disabled for the application
User registration has an unknown property and dynamic properties are disabled for this version of the application
Missing "password" property
Required property is missing
Missing value for the identity property
External registration failed with an error.
General user registration error. Details included with the error message.
User with the same identity already exists
Missing application-id or collection of properties for the registering user
Property "id" cannot be used in the registration call
Email address is in the wrong format
A value for a required property is missing
Duplicate properties in the registration request
Property value exceeds the length limit
BackendlessUser *user = [BackendlessUser new]; = @"";
user.password = @"iAmWatchingU";

[Backendless.shared.userService registerUserWithUser:user responseHandler:^(BackendlessUser *registeredUser) {
    NSLog(@"User registration completed");
} errorHandler:^(Fault *fault) {
    NSLog(@"Error: %@", fault.message);
let user = BackendlessUser() = ""
user.password = "iAmWatchingU"

Backendless.shared.userService.registerUser(user: user, responseHandler: { registeredUser in
    print("User registration completed")
}, errorHandler: { fault in
    print("Error: \(fault.message ?? "")")

Turning Registration Off

User registration can be disabled for a particular version of the application using the Backendless Console:

  1. Login to the console and select the application.
  2. Click the Users icon in the vertical icon menu on the left.
  3. Click User Registration.

The Registration toggle turns the registration API on or off. When the registration is turned off and a user attempts to register, the system returns error 3009.


Email Confirmations

Backendless can send out an email requesting new registered users to confirm their email address. This feature can be configured in the Backendless Console:

  1. Log into the console and select the application.
  2. Click the Users icon in the vertical icon menu on the left.
  3. Click User Registration.


When email confirmations are turned on (the feature is disabled by default), the "email" user property is required and must contain a value formatted as an email address. To configure the text of the email message,  click the Messaging icons in the vertical icon bar in Backendless console and select the EMAILS tab. Use the User made registration template.

When email confirmations are enabled in the app, new registered users will not be able to login until they confirm their email address. For more information see the User Status section of this guide.