Working With Roles & API Scopes
Learn how to use roles and API scope permissions when working with the Deepgram API and Console.
Deepgram uses a tiered system of access control to provide granular access to its endpoints. These tiers include account (or global) permissions and project permissions. Applying different tiers of permissions allows for more granularity at the project level. For example, an account may have the project:kick
permission for one project but not for another project.
Account Roles
At the account level, certain permissions imply other specific permissions. For example, an account that has access to the project:write
permission also implicitly has access to the project:read
permission. Similarly, account:write
access implies access to every other account permission.
Project Roles
At the project level, users can have access to several roles, including owner
, admin
, and member
, which, similar to account permissions, imply access to another set of permissions:
Self-Hosted Product Scopes
Deepgram self-hosted users have been assigned self-hosted product scopes in accordance with their contracts. Any user with these scopes may create self-hosted API keys and distribution credentials.
The full list of self-hosted product scopes is as follows:
The self-hosted:products
scope can be provided at self-hosted API key or distribution credentials creation time as a short-hand which implies all available self-hosted product scopes.
For example an API key has the self-hosted:product:api
, self-hosted:product:engine
, and self-hosted:product:license-proxy
scopes granted to it. For requests authenticated with that API key, the use of self-hosted:products
would imply all of those scopes when included in a key creation request.
Product Scopes and Project Roles
Self-hosted API keys can also be created with Console project roles. To do so, simply include the desired role in the same scopes
list as the self-hosted product scopes when submitting the key creation request.
Here is an example of an self-hosted API key which includes both the member
project role as well as the self-hosted:products
scopes.