Extended registration form

How it works

During user registration, the following main fields are requested:

  • When using the API calls:
    • 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 Login API

If you use integration via Login API:

  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 call 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 new user request, pass the fields parameter with the required fields.

Example of the request:

Copy
Full screen
Small screen
http
  • http
  • curl
POST https://login.xsolla.com/api/user?login_url=https://example.com&projectId={projectId} HTTP/1.1
Content-Type: application/json

{
  "username": "john-email@email.com",
  "password": "123456",
  "email": "john-email@email.com",
  "fields": {
     "nickname": "John",
     "country-name": "US",
     "bday": "1997-07-16"
  }
}
curl --request POST \
  --url 'https://login.xsolla.com/api/user?login_url=https%3A%2F%2Fexample.com&projectId=projectId' \
  --header 'content-type: application/json' \
  --data '{"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 calls, 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 calls, 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:

Copy
Full screen
Small screen
http
  • http
  • curl
POST https://your.hostname/new_user_url.path HTTP/1.1
Content-Type: application/json
Authorization: Bearer {JWT}

{
  "email": "john@gmail.com",
  "password": "123456",
  "country-name": "DE",
  "nickname": "JohnSnow",
  "platform": ["windows", "mac os"]
}
curl --request POST \
  --url 'https://your.hostname/new_user_url.path' \
  --header 'authorization: bearer_JWT' \
  --header 'content-type: application/json' \
  --data '{"email":"john@gmail.com","password":"123456","country-name":"DE","nickname":"JohnSnow","platform":["windows","mac os"]}'

Was this article helpful?
Thank you!
Is there anything we can improve? Message
We’re sorry to hear that
Please explain why this article wasn’t helpful to you. Message
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.
Rate this page
Rate this page
Is there anything we can improve?

Don’t want to answer

Thank you for your feedback!
Last updated: June 9, 2021

Found a typo or other text error? Select the text and press Ctrl+Enter.

Report a problem
We always review our content. Your feedback helps us improve it.
Provide an email so we can follow up
Thank you for your feedback!