Service accounts

Service accounts let you programmatically call Unity Services APIs, including the Multiplay API. You can create any number of service accounts, each with one or more project roles.

Service account roles

Service accounts support role-based access control (RBAC) through project roles. These roles give the service account permissions to perform specific activities, such as managing allocations. If you try to use a service account for something it doesn't have permission to do, the API call authorization fails.

Refer to Project roles for more information about specific roles.

Create a service account

The following steps create a service account for allocating and deallocating servers:

  1. Sign in to the Unity Cloud Dashboard.
  2. Select Administration > Service accounts.
  3. Select + New.
  4. Name the service account and, optionally, add a description.
  5. Select Create.
  6. In the Project roles section, select + Manage project roles.
  7. Choose your project from the list, then select Next.
  8. In the next dialog, select Multiplayer, then select Game Server Hosting Allocations Admin.
  9. Select Save.

Generate a service account key

To generate an authentication key pair for a service account:

Note: If you don’t already have a service account, refer to Create a service account.

  1. Sign in to the Unity Cloud Dashboard.
  2. Select Administration > Service accounts.
  3. Open the context menu (...) for the service account for which you want to create a key, then select Details. If you don’t already have a service account, refer to Create a service account.
  4. Under Keys, select + Add key.
  5. This automatically generates a Key ID and Secret key pair for the service account. Save both the Key ID and the Secret key in a safe location.
  6. Select Done.
  7. View Authentication for more information on using these credentials on API requests.