Extended Registration Form

How It Works

During user registration, the following main fields are requested:

  • When using the API methods:
    • Username
    • Email
    • Password
    The username and email fields should have the same value.
  • When using the Login widget of any version:
    • Email
    • Password

You can request extra fields from the user if needed.

Who Can Use It

Partners who have already integrated Login.

How to Get It

The set of available fields in the extended registration form depends on the Login integration and storage that you use for user data. To set up the form, choose the integration and storage types, and follow the instructions.

Integration via API Methods

If you use integration via API methods:

  1. Contact your Account Manager and send them the list of fields. For each field, specify:
    1. name;
    2. type;
    3. whether it is required;
    4. name of the parameter that will be used when requesting the API method for registration.

Default field options:

Field name

TypeName of the parameter
Username (always required)stringusername
First namestringgiven-name
Second namestringfamily-name
Nicknamestringnickname
Birth datedate (YYYY-MM-DD)bday
Genderenum (f or m)gender
Countryselect (ISO 3166-1 alpha-2)country-name
Subscribe to the newsletterbooleanpromo_email_agreement

  1. In the Register a New User request, pass the fields parameter with the required fields.

Example of the request:

POST https://login.xsolla.com/api/user?login_url=https://example.com&projectId={projectId}

Headers:
Content-Type: application/json

Body:
{
  "username": "john-email@email.com",
  "password": "123456",
  "email": "john-email@email.com",
  "fields": {
     "nickname": "John",
     "country-name": "US",
     "bday": "1997-07-16"
  }
}

Integration via Login Widget

If you use integration via the Login widget of any version, contact your Account Manager and send them the list of fields. For each field, specify the name and whether it is required.

Default field options:

  • Username (always required)
  • First name
  • Second name
  • Nickname
  • Birth date
  • Gender
  • Platform
  • Country
  • Subscribe to the newsletter

Note: If you use Xsolla storage, the platform field is not available.

Xsolla Storage

If you use Xsolla storage, only the fields listed are available for use. The field values are stored on the Xsolla side.

PlayFab Storage

If you use PlayFab storage, extra fields are stored as user data in your Title PlayFab.

In addition to the fields listed, you can pass other fields with the following information:

  • name
  • type:
    • string
    • date
    • select — a selection of one option from the list
    • multi-select — a selection of several options from the list
  • whether it is required
When integrating via API methods, field names can be any. For select and multi-select fields, pass a set of possible values for these fields to your Account Manager.

You can get user data via PlayFab API or in your Playfab account:

  1. Go to Players and click on the user ID.

  1. Choose Player Data (Title) tab.

Custom Storage

If you use custom storage, extra fields are sent in the registration request to New user URL.

In addition to the fields listed, you can pass other fields with the following information:

  • name
  • type:
    • string
    • date
    • select — a selection of one option from the list
    • multi-select — a selection of several options from the list
  • whether it is required
When integrating via API methods, field names can be any. For select and multi-select fields, pass a set of possible values for these fields to your Account Manager.

EXAMPLE

The following fields were set up:

  • Nickname
  • Country
  • Custom field platform with multi-select type and possible values windows, mac os, linux
During user registration, the following request will be sent to New user URL:

POST {New user URL}

Headers:
Content-Type: application/json
Authorization: Bearer {JWT}

Body:
{
  "email": "john@gmail.com",
  "password": "123456",
  "country-name": "DE",
  "nickname": "JohnSnow",
  "platform": ["windows", "mac os"]
}