User data import and export

Xsolla Login allows you to import and export user data in CSV format. It can be useful when you need to create a backup copy of user data or migrate data from another authorization service.

You can export and import user data via Login API. Exporting, unlike importing, is also available in Publisher Account.

User data import

To import user data into Xsolla Login:

  1. Create field mapping — a JSON file containing field numbers and names. The index in the mapping should start at 0.

Notice
Bcrypt is the only supported password encryption type. If you use another encryption type, add verified user email to the mapping — when a user signs up, they will receive a one-time link to change their password.
Field mapping example:
Copy
Full screen
Small screen
{
    "email": 0,
    "email_verified": 1,
    "user_id": 2,
    "is_active": 3,
    "username": 4,
    "birth_date": 5,
    "gender": 6,
    "full_name": 7,
    "last_name": 8,
    "first_name": 9,
    "nickname": 10,
    "picture": 11,
    "password_hash": 12
}
  1. Create a database in CSV format. There must be no headings in the database. email is a required field. Maximum file size: 64 MB. For more information about the supported data types, refer to the table with parameter descriptions.
Database example:
email1@example.comtrue12qw34er56
email2@example.comfalsety78qw12rt34
email3@example.comfalse4er5612qw3
email4@example.comtruet12rt34y78qw
email5@example.comtrue12rt34ty78qw
  1. Specify the attribute validation rules in JSON Schema format (optional).
  2. Pass the created mapping and database in the Import user data API call.
Note
Xsolla doesn’t notify you whether data import was successful or resulted in an error. To know the import status, contact your Customer Success Manager or email to csm@xsolla.com.

User data export

Note
If you configured the JSON Scheme, there will be user attribute validation when exporting user data.
You can export user data from Xsolla Login via:

User data export via Publisher Account

  1. Open your project in Publisher Account.
  2. In the side menu, click Login.
  3. Click Configure in the Login project pane.
  4. Go to the User database > Users section.
  5. Click Export users.
  6. In the opened window, enter the email where you want to receive the archive of user data.
  7. Click Export.
Note
The password for the archive is your secret key. You can find it in the Security > JWT signature section in the Login project pane.

User data export via API

To export user data via API, call the Export user data method.

Description of parameters used to import data

ParameterTypeDescription
email
stringMaximum length: 255 symbols.
email_verified
booleanStatus of email verification. If the field is empty, true is used.
user_id
stringMaximum length: 255 symbols.
is_active
booleanStatus of user account verification. If the field is empty, true is used.
username
stringIf the field is empty, username is used. Maximum length: 255 symbols.
birth_date
dateMaximum length: 255 symbols.
gender
stringMaximum length: 20 symbols.
full_name
stringMaximum length: 255 symbols.
last_name
stringMaximum length: 255 symbols.
first_name
stringMaximum length: 255 symbols.
nickname
stringMaximum length: 255 symbols.
picture
stringLink to a user’s avatar. Maximum length: 255 symbols.
password_hash
stringMaximum length: 64 symbols.
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: January 22, 2024

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!