Last Updated: 7/22/2021, 6:58:04 AM

# User Accounts

# Overview

User Accounts allow people to access your platform. This includes not only your players, but also everyone at your organization who has access to the Admin Portal.

There are two types of users: Admin and non-Admin. Admin users are allowed to access the Admin Portal, so this includes your colleagues at your organization. Non-Admin users, on the other hand, cannot access the Admin Portal. Non-Admin users are players. Player accounts can be managed by Admin users in the Admin Portal.

# Permissions

Permissions are used to grant access to specific resources within our services. Here are some of the basic permissions you’ll need to work with accounts, but there are many other aspects of account management. For a full list of permissions that impact account management, see the IAM tab of the permissions reference (opens new window).

Usage Resource Action
Create/Find/Update/Delete a User NAMESPACE:{namespace}:USER Create/Read/Update/Delete
Get User by ID NAMESPACE:{namespace}:USER:{userId} Read
Get User’s Information NAMESPACE:{namespace}:INFORMATION:USER:{userId} Read
Reset User’s Password ADMIN:NAMESPACE:{namespace}:PASSWORD:USER Update
Get User’s Login Histories ADMIN:NAMESPACE:{namespace}:HISTORY:LOGIN:USER:{userId} Read

# Managing Accounts in the Admin Portal

# Create a New User

  1. In the publisher namespace of the Admin Portal, click Users in the User Management section.

    User Account Management
  2. The Users menu appears. Click the Create New button in the top-right corner of the Search User panel.

    User Account Management

    NOTE

    If the Create New button does not appear you may be in a game namespace, since users can only be created in a publisher namespace. If you’re in the publisher namespace and this button still does not appear, contact a Super Admin to request permission to create users.

  3. The Create New User form appears. Fill in the required information:

    User Account Management
    • Input the Email Address of the person who will use the account.
    • Input a Username for the new account. Each account’s username must be unique.
    • Input a Display Name for the new account. Display names do not have to be unique.
    • Input the Date of Birth of the account user.
    • Select the Country the account user is located in.
    • Select the user’s Language.
    • Input a secure Password for the account, or click Generate new password to have the Admin Portal automatically create a secure password for you.

    NOTE

    Make sure to copy the password, before clicking Create. After this, the password will no longer be accessible.

  4. When you’re done, click Create. The new account will be created and you will be taken to the user’s dashboard, where you can further manage their account.

    TIP

    After you create a user, you can assign the user a role to allow them access to certain resources. For more information, see our Roles documentation.

# Invite an Admin

You can also quickly invite your colleagues or community managers from your game to the Admin Portal. To do so, follow the steps below:

  1. In the Admin Portal, open the Platform Configurations menu in the top-right corner of the page and click Admins.

account-management

  1. On the Admin page, click the Invite Admin button.

account-management

  1. The Invite Admin form appears. Fill in the fields with the following information:

    • In the Assigner Email field, enter the email address for each person that you wish to give admin access to. You can enter multiple email addresses at once.
    • In the Namespace field, choose the namespace the new admins will have access to. You can either select a single namespace or the All Namespaces item from the dropdown menu. After selecting a namespace, the roles field will appear. Only those roles that are valid for the selected namespace will be listed.

    NOTE

    You can also add another namespace for the user to access later by following steps in the Roles documentation.

    • In the Roles field that appears after selecting a namespace, select the checkbox for each role you wish to assign to the new admins. Make sure you choose at least one role that provides admin permissions, or the users you invite will not have admin access!

    account-management

  2. When you’re finished, click the Invite button. Invitations will be sent to the email addresses you provided.

    IMPORTANT

    The invitation email is only valid for 60 minutes. If the invited admin does not complete account registration after 60 minutes, you’ll need to send them a new invitation.

# View a User’s Event Log

The User Event Log shows you the history of any changes or actions made by a user, such as when a user logged into the portal or downloaded their personal data. You will only be able to see events from namespaces for which you have permission to view users’ login histories.

  1. In the Users list of the Admin Portal, select the desired User and click Logs. Then, input the date range you want to display.
User Account Management
  1. On the Logs page, you will see a list of user logs and a timestamp of when they were created in the Date field. Click View in the Action column of a log to open the Event Log Details.
User Account Management

# View a User’s Edit History

The account history feature allows you to see changes made to account data by users. The information available includes changes made to a user’s Display Name, Email Address, Password, or Date of Birth.

  1. In the Users menu of the Admin Portal, open the desired user and click View Account History to get their edit history.
User Account Management
  1. Input the Start and End Date of the time period for which you want to retrieve the history. For example, here we input 2020-07-27 to 2020-08-04 to see the changes the user made to their Display Name within that time period.
User Account Management

You can also view the edit history for other fields, such as Email Address, Password, or Date of Birth.

User Account Management

# Managing Accounts Using the SDK

# In-Game Player Registration

This function allows your players to register for an account in your game.

# Player Verifies Registration

This function allows a player to verify their account registration, which they must do before they can log into their account.

# Player Upgrades a Headless Account

This function upgrades a headless account by linking the headless account with the email address and password.

# Player Login with Username and Password

This function shows how players can log into your game using a verified account.

# Get Account Data for the Currently Signed-in User

Getting user data retrieves all of the personal data for the player that’s logged in.

# Managing Accounts Using API

# Create a New User

Follow the steps below to create a new admin user using the API.

  1. Use the Create User endpoint: POST - /iam/v4/public/namespaces/{namespace}/users (opens new window)

  2. Enter your publisher namespace in the Namespace field.

  3. Fill out the Request Body:

    • Enter the MD5 of the password you want to use for the new user in the PasswordMD5Sum field. If you aren’t using MD5 encryption, leave this field blank.
    • Enter EMAILPASSWD in the Auth Type field.
    • Enter the user’s country in the Country field, using ISO 3166-1 alpha-2 format (opens new window), e.g. US (United States), ID (Indonesia).
    • Enter the user’s date of birth into the Date of Birth field, using YYYY-MM-DD format, e.g. 2019-04-29.
    • Enter a display name for the user in the Display Name field.
    • Enter the user’s email address in the Email Address field.
    • Enter a secure password for the user in the Password field. Make sure to save the password somewhere safe.

Upon a successful request, the new user will be created. Here is an example response from a successful request:

TIP

Once the user is created, you can verify the account using the Verify User Without Verification Code (opens new window) endpoint by inputting your publisher namespace and the user’s User ID. This allows you to verify the account without having to use a verification code.

TIP

After you create a user, you can assign the user a role to allow them access to certain resources. For more information, see our Roles documentation.

# Invite an Admin

You can also quickly invite your colleagues or community managers from your game to the Admin Portal.

  1. Use the Invite User Admin endpoint: POST - /iam/v3/admin/namespaces/{namespace}/users/invite (opens new window)

  2. Enter your publisher namespace in the Namespace field.

  3. Fill out the Request Body:

    • Enter the new admin’s email address into the emailAddress field.
    • Enter the role ID of the role you want to assign the new admin in the roles field.

Upon a successful request, the invitation email will be sent to the new admin. Here is an example response from a successful request:

# Get a User’s Event Log

The User Event Log shows you the history of any changes or actions made by a user, such as when a user logged into the portal or downloaded their personal data. You will only be able to see events from namespaces for which you have permission to view users’ login histories.

  1. Use the Get events from a specific use endpoint: GET - ​/event​/v2​/admin​/namespaces​/{namespace}​/users​/{userId}​/event (opens new window)
  2. Enter your publisher namespace in the Namespace field.
  3. Enter the user ID of the user whose logs you want to look up in the User ID field.
  4. If you want to paginate the results, enter the number of lines you want to display on a single page in the pageSize field. Otherwise, leave this field blank.
  5. If you want to only display data from a specific time range, input a start date and end date for the retrieved data in the startDate and endDate fields. Otherwise, leave these fields blank.
  6. If you want to paginate the results, enter the line of data you want the retrieved data to start on in the offset field. Otherwise, leave this field blank.
  7. If you want to narrow the data retrieved to a particular event type, enter that type in the eventName field. For example, if you enter userLoggedIn you will only see the user’s login history. For a complete list of event names, see the user log event reference (opens new window).

Upon a successful request, the user’s log data will be retrieved. Here is an example response from a successful request:

# Get a User’s Edit History

The account history feature allows you to see changes made to account data by users. The information available includes changes made to a user’s Display Name, Email Address, Password, or Date of Birth.

  1. Use the Get a User Edit History Based on the Provided Type endpoint: GET - /event/v2/public/namespaces/{namespace}/users/{userId}/edithistory (opens new window)
  2. Enter your publisher namespace in the Namespace field.
  3. Enter the user ID of the user whose history you want to look up in the User ID field.
  4. If you want to paginate the results, enter the number of lines you want to display on a single page in the pageSize field. Otherwise, leave this field blank.
  5. If you want to only display data from a specific time range, input a start date and end date for the retrieved data in the startDate and endDate fields. Otherwise, leave these fields blank.
  6. If you want to paginate the results, enter the line of data you want the retrieved data to start on in the offset field. Otherwise, leave this field blank.
  7. If you want to narrow the data retrieved to a particular type, enter that type in the Edit History field. You can also leave this field blank to return all data types. The types of data that can be retrieved are listed below:
Type Description
email Email address edit history
password Password edit history
displayname Display Name edit history
dateofbirth Date of Birth edit history
country Country edit history
language Language edit history

Upon a successful request, the edit history for the user will be retrieved. Here is an example response from a successful request: