User Registration

Top  Previous  Next

The user registration API can be used to create user accounts in the application. The 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. Unless the properties are modified in the console, the default property marked as identity is "email". Additionally, the "email" property is required if the application is configured to confirm email addresses for the registered users.Method:

POST

URL:

/<version name>/users/register

 

Request Headers:

application-id: app-id-value
secret-key: secret-key-value
Content-Type:application/json
application-type: REST

where:

application-id- the ID of your application generated upon its creation. You can find this header in the Manage > App Settings section of the Backendless Console. This header is mandatory. Please refer to the Obtaining Application ID and Secret Key section for information on how to obtain the values for the header.
secret-key - the key of your application generated upon its creation. You can find this header in the Manage > App Settings section of the Backendless Console. This header is mandatory. Please refer to  the Obtaining Application ID and Secret Key section for information on how to obtain the values for the header.
Content-Type- a static value, should be set to application/json. This header is mandatory.
application-type- a static value, should be set to REST. This header is mandatory.

Request Body:

{
 "email" : value,
 "password" : value,
 …
}

Response Body:

{
 "objectId" : value,
 "email" : value,
 "password" : value,
 …
}

Error Codes:

When the server-side reports an error, it returns a JSON object in the following format:

{
 "message":error-message,
 "code":error-code
}

The following errors may occur during User Registration API calls.

Error Code

Description

2002

Version is disabled or provided wrong application info (application id or secret key)

3009

User registration is disabled for the version of the application

3010

User registration has an unknown property and dynamic properties are disabled for this version of the application

3011

Missing "password" property

3012

Required property is missing

3013

Missing value for the identity property

3014

External registration failed with an error.

3021

General user registration error. Details included with the error message.

3033

User with the same identity already exists

3038

Missing application-id, version name or collection of properties for the registering user

3039

Property "id" cannot be used in the registration call

3040

Email address is in the wrong format

3041

A value for a required property is missing

3043

Duplicate properties in the registration request

8000

Property value exceeds the length limit

 

curl
 -H application-id:application-id
 -H secret-key:secret-key
 -H application-type:REST
 -H Content-Type:application/json
 -X POST
 -d '{"name":"James Bond", "password":"watchingya", "email":"jbond@007.com"}'
 -v
 https://api.backendless.com/v1/users/register

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 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.

registration-toggle

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 Registration.

email-confirmation

When email confirmations are required (the feature is enabled 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, select Communication & Email Templates from the Users menu in the console and select the User registers event.


Please let us know how we can improve the documentation by leaving a comment. All technical questions should be posted to the Backendless Support forum. We do not respond to the technical questions on the documentation pages.: