Registering Users

Another version of this information is available

If you're new to Tilia services, another version of this information is available in the Tutorials section of these docs, which might be an easier place to start.

As an integrator, we assume you have an existing registration and user management system of your own; thus, our platform utilizes "shadow accounts". This means we expect you to perform user authentication within your application and pass us the unique Tilia account ID when granting user access and performing transactions on our platform.

Registration creates the user's Tilia account ID. It also creates the user's wallets.

Registration Requirements

Registering a user in Tilia requires the following:

  • username and at least one of the following
  • The user's email address or user_ID from an external payment provider (e.g. Steam or Oculus).

Usernames must be unique.

Email must be a valid email address for the registered user. Tilia uses this address when sending receipts and when contacting the user about their Tilia account.

In most environments, the user will not receive a verification email when their account is created. Thus it is important that you ensure the provided email address is accurate and you inform Tilia of any changes to a user's contact information.

attention

You are required to update Tilia with changes to a user's email address. Refer to the Accounts API reference for information on updating accounts.

In addition to the required fields, optional fields can be used to pass additional details. Refer to the Accounts API reference for more information.

Registering a user with email

This example requires an API token with the scope write_registrations.

To register a user, submit a POST request with a request body containing the required information. You can also pass any optional registration information.

Copy
Copied
curl --location --request POST https://accounts.staging.tilia-inc.com/register\
--header 'Authorization: Bearer <Access_Token>' \
--header 'Content-Type: application/json' \

Request Body

Copy
Copied
{
  "username": "AUniqueUsername",
  "email": {
    "address": "user@example.com"
  }
}

Response Body

Copy
Copied
{
    "status": "Success",
    "message": [],
    "codes": [],
    "payload": {
        "account_id": "8965f149-c0e8-49f1-a10b-2aa55eee6767",
        "username": "AUniqueUsername",
        "password": "",
        "user_id": "",
        "steam": {
            "user_id": ""
        },
        "oculus": {
            "user_id": ""
        },
        "apple": {
            "user_id": ""
        },
        "google": {
            "user_id": ""
        },
        "email": {
            "email_id": "34218a23-39fe-4e42-9d9f-3ded60ca8bde",
            "address": "user@example.com",
            "email_types": [
                "primary_contact"
            ],
            "is_verified": true
        },
        "full_name": "",
        "street_address_1": "",
        "street_address_2": "",
        "street_address_3": "",
        "city": "",
        "state_province": "",
        "country_iso": "",
        "zip_postal_code": ""
    }
}
Important

The Account ID should be stored in your system and associated with your user's account. This is the only key you have to operate on the user's Tilia account!

Account Creation Webhook

You may wish to implement a webhook to notify you when a new Tilia account is created. See the Account Creation webhook documentation for complete details.

attention

Currently, webhook endpoints must be configured manually by our staff. We are working on a web interface to enable you to control this directly. For now, please contact us for assistance.