Service accounts
Call Unity Services APIs programmatically with service accounts
阅读时间1 分钟最后更新于 2 天前
Use service accounts to call Unity Services APIs, and to access and configure admin APIs.
Roles and permissions
Service accounts support role-based access control (RBAC) through roles. You assign organization roles and project roles to each service account. These roles give the service account permissions to perform specific activities, such as managing allocations. If you try to use a service account for an activity without the required permission, the API call authorization fails. For more information on roles for various Unity services, refer to the following pages:Create a service account
To create a service account, follow these steps:- In the Unity Dashboard, open the Account menu and select Manage organization.
- In the Administration menu, select Service Accounts.
- To create a new account, select New.
- Enter a name and a description for the service account.
- Select Create.
-
Generate an authentication key pair for the service account.
- In the Keys section, select Add key. Unity generates a key ID and a secret key for the service account.
-
Copy and securely store the values for Key ID, Secret key, and Authorization header.
- Select Done.
-
To allow access to API endpoints, add a role to your service account at either the organization level or project level:
- To grant the service account organization-wide data access for all projects in your organization, select Manage organization roles.
- To grant the service account project-level data access for individual projects, select Manage project roles.