SAP Customer Data Cloud Positions

accounts.initRegistration REST

Skip to end of metadata
Go to start of metadata


This method initializes a registration process at a site. To fully register a user to your site requires three API calls:

  1. accounts.initRegistration
  2. accounts.register
  3. accounts.finalizeRegistration

The method returns a  regToken  (registration token) in the response, which is required when calling accounts.registeraccounts.finalizeRegistrationaccounts.linkAccounts

For registration through a social network, see accounts.socialLogin.

For registration of lite accounts, see below



Request URL

Where <Data_Center>  is:
  • - For the US data center.
  • - For the European data center.
  • - For the Australian data center.
  •  - For the Russian data center.
  •  - For the Chinese data center.

If you are not sure of your site's data center, see Finding Your Data Center.



Defines whether the regToken that is returned can be used to create a full registered account or a lite account.

Set this to TRUE to create a lite account.


*Early Adopters parameter - supported only with Global Access*

The data center in which the registering user's data will be stored. Acceptable values:

  • us1
  • eu1
  • au1
  • ru1
  • cn1
format string Determines the format of the response. The options are:
  • json (default)
  • jsonp - If the format is jsonp then you are required to define a callback method (see parameter below).
callback string This parameter is required only when the format parameter is set to jsonp (see above). In such cases this parameter should define the name of the callback method to be called in the response, along with the jsonp response data.
httpStatusCodes Boolean The default value of this parameter is false, which means that the HTTP status code in Gigya's response is always 200 (OK), even if an error occurs. The error code and message is given within the response data (see below). If this parameter is set to true, the HTTP status code in Gigya's response would reflect an error, if one occurs.

Authorization Parameters

Each REST API request must contain identification and authorization parameters.

Some REST APIs may function without these authorization parameters, however, when that occurs, these calls are treated as client-side calls and all client-side rate limits will apply. In order to not reach client-side IP rate limits that may impact your implementation when using server-to-server REST calls, it is Recommended Best Practice to always sign the request or use a secret. A non-exhaustive list of REST APIs that this may apply to are as follows:

  • accounts.login
  • socialize.login
  • accounts.notifyLogin
  • socialize.notifyLogin
  • accounts.finalizeRegistration
  • accounts.linkAccounts

Please refer to the Authorization Parameters section for details. 

Response Data

apiVersion integer Defines the API version that returned the response and may not always be returned.
callId string Unique identifier of the transaction, for debugging purposes.
errorCode integer The result code of the operation. Code '0' indicates success, any other number indicates failure. For a complete list of error codes, see the Error Codes table.
errorDetails string This field will appear in the response only in case of an error and will contain the exception info, if available.
errorMessage string A short textual description of an error, associated with the errorCode, for logging purposes. This field will appear in the response only in case of an error.
fullEventName string The full name of the event that triggered the response. This is an internally used parameter that is not always returned and should not be relied upon by your implementation.
time string The time of the response represented in ISO 8601 format, i.e., yyyy-mm-dd-Thh:MM:ss.SSSZ or
statusCode integer The HTTP response code of the operation. Code '200' indicates success.
This property is deprecated and only returned for backward compatibility.
statusReason string A brief explanation of the status code.
This property is deprecated and only returned for backward compatibility.


regTokenstringA ticket that is used to complete the registration process if registration fails. Valid for one hour.

A field that does not contain data will not appear in the response.


Response Example

Full Registered Account

  "regToken": "RT1_dBFII5RbVxUc8nBdc3bMDT7hmmrIvgen1wCG_dxqadJhAAWkNZSIhV-1DGKZvwZ0-DQUg5JS8Y61ukrjwOp8p81S9pP6R_BhovjemyHtbA0dAsx-PMuL2zIosIac-rUvj3lTh1WL6rg0IY1bFO3pdrgQvxN_Pxa0r6kxTb5QiZNn7ojd-SXYnLUgrW6iw-OIzAzp8hZBMN_hpwEauylxTfJM_9nGpnT_QxLnoKTAEvzIhK-yFU9PJlT_RA7tJzjahTxqRxU3Qd3KsYtAu-K5wRoRNGpVMTWQbKoe6lIeSKnF6lFNeozDiuv1Vat6c9qE8RVOhp8leM9NAWG_3937L2MchFEFbBNqsgKk0QZ8Ow_SG03SS2RhQpq8KhG28A-47i1PXY041LHP_J8NwtUI8u0_ObVDsIInv3h33aKPQN1BxY4DxICSXtS8iuL7dsgG2T0KuegagIoYiNhLbnSeowkRRkZ-wiiKJOTupKGw7w6bmjqwBhqGWo9cudKLMFT22lsZ3oqah3SXizOi8NKP6g..",
  "statusCode": 200,
  "errorCode": 0,
  "statusReason": "OK",
  "callId": "5d18ece8a76f422e917bbbf094c5cf11",
  "time": "2015-03-22T11:42:25.943Z"


Lite Account

Note the _LTE_ in the regToken which designates this as a lite account regToken.

  "regToken": "RT1_LTE_stD2lH~02045353544b083130313130303935016f60~oAFTqSaZcw_2RPXm4lpl0yriKB_06gy8Vgt2VTBw0HY-2rJdVq5DcPiDdIfxUanHJ-1C0g_gXzJgprkjbM46QduXtvYZRvoHMNig9bCRXD7ycX4a_-p9U6j4XmtyucHMvcYqjLAP6yVo7rWYlGqUocZn0ml2j42pjsY_bJ6t1TRMwcT0EHiPMb9gf_2nkd7T-ECVS7Fmvi9h2NYPuNY5zooWEGVVGwXYpNj-ENd2bvFeNtY~",
  "statusCode": 200,
  "errorCode": 0,
  "statusReason": "OK",
  "callId": "6ceb78164ac34ae9b5222b96026e9ec9",
  "time": "2017-06-07T09:44:24.621Z"


Lite Account Subscription Flow

Lite Registration is a premium product that requires separate activation. For inquiries, contact your Customer Engagement Executive by filling a support form. You can access the support page by clicking Support on the upper menu after logging into your Gigya Console.

Lite accounts differ from full registered accounts in several important ways *.

  • Lite accounts are NOT registered accounts.
  • Lite account users are not able to login to your site.
  • Lite accounts support additional limited functionality compared to full accounts.
  • The only two APIs required to create a lite account are:

You do not use accounts.register or accounts.finalizeRegistration in a lite account flow.To learn more about Lite Accounts, see the Lite Registration documentation.

The following will demonstrate how you can register a user's email address or update an existing lite account using Gigya's web SDK.

1.    If not using Screen-Sets, you will need to collect some basic information from the user. The minimum data required is an email address.

2.    If necessary, ensure that you defined the necessary subscription in your site's schema. This can be done using either the Screen-Sets UI Builder or the accounts.setSchema API.

3.   After the user confirms they would like to subscribe to your site/newsletter/etc., call accounts.initRegistration and pass isLite: true so the API recognizes that this is not for a full registration, and also a callback so you can retrieve the user's regToken which you will need in the next step.

gigya.accounts.initRegistration({ isLite: true, callback: liteRegistrationCallback });

4.   In the callback, call accounts.setAccountInfo and pass the following minimum parameters:

  • regToken (required - The regToken you received from accounts.initRegistration)
  • profile (required - If you have any profile data to associate with this user, i.e., profile.firstName, profile.lastName, etc. At a minimum you must pass an email address.)
  • subscriptions (optional - This must be an active subscription pre-defined in your site's schema. You can create lite accounts that do not have a subscription.)

A code example of the entire process follows, see Subscriptions Object REST for a full description of the subscription object:


JS Code Example

function liteRegistrationCallback(res) {
    var myToken,myEmail,myProfile,callParams;
    myToken = res.regToken;
    myEmail = "The user's email address";
    myProfile = {
        "email" : myEmail
        //, any additional profile data collected, i.e., firstName
    callParams = {
        "regToken": myToken,
        "profile": myProfile,
        "subscriptions": {
            "jun4th":{ // This MUST be active and predefined in your site's schema or setAccountInfo will fail!
                    "isSubscribed":true, // This tells whether the user is actually subscribed to the subscription, this can be false if the user registers but does not want to receive the newsletter.
                        // Any tags you want to associate with this user.
                        // The tags property should be removed if you are not setting tags or any existing data will be deleted.
function liteRegStart() {
        isLite: true,
        callback: function(res) {


5.   Once the call completes the user will have a new lite account on your site. You can then query this and other lite accounts on your site using the API or view them from the Identity Access page of the Gigya Console.

Response Example Using The isLite Parameter

// Note the regToken contains _LTE_ which designates this is a lite account regToken


Additional Information

For configuring a screen-set to support lite account creation, see our Lite Registration Quick Start Guide.