Skip to main content

Get your API key

Copy the environment API key that your application, the Permit SDK, and your policy decision point (PDP) use to authenticate with Permit.io. Each API key belongs to one environment, so copy the key of the environment your application connects to.

Prerequisites

Copy the API key from the Projects screen

  1. Open the Permit dashboard and go to the Projects screen.
  2. Find the project and the environment your application connects to.
  3. On the environment card, click the three dots icon in the top-right corner.
  4. Choose Copy API Key from the menu. The API key is copied to your clipboard.
Projects screen with the Production environment card menu open and Copy API Key highlighted

Copy the API key from the user menu

You can also copy the API key of the active environment. Click your user icon in the top-right corner, then choose Copy Environment Key.

User menu open in the Permit dashboard with Copy Environment Key highlighted
Copy Environment Key uses the active environment

Copy Environment Key copies the API key of the environment that is active in the sidebar. If you switch the active environment and click Copy Environment Key again, you copy the API key of the newly active environment, which is a different key.

Keep the API key secret

Anyone with an environment API key can call the Permit API for that environment, including changes to its policy. Load the API key from an environment variable or a secrets manager, and don't commit it to source control.

Verify the API key

Send a request to the API key scope endpoint. Replace [YOUR_ENV_API_KEY] with the key you copied:

No files found in the specified folder path.

A valid environment API key returns the IDs of the organization (workspace), project, and environment the key belongs to:

No files found in the specified folder path.

Next steps