Skip to main content

API key types

The Application API accepts two types of API keys: Use application API keys when you want end users or client apps to call the Application API with permissions limited to one user. Use admin API keys for trusted server-side integrations that need broad access.

Application API keys

Application API keys are scoped to a specific user. Each key can only perform Application API operations on behalf of the user it was created for, which makes them safe to expose in client-side environments. Application API keys cannot be used with the Admin API.

Creating application API keys

Create application API keys with the Admin API. You authenticate that request with an admin API key. You can create keys for up to 100 users per request. The full key value is returned once at creation time and cannot be retrieved again—store it securely or deliver it to the client immediately.
A successful response includes the key ID (used later to delete the key), the user ID, the full key, and a readable prefix:

Anatomy of an application API key

Each application API key is made up of 2 parts separated by a period:
  • The prefix identifies the key (for example app_XXXXX) and is safe to log or display.
  • The body is the secret part, and is only shown once when you create the key.
When using the API, both parts of your application API key must be sent in the X-API-KEY header.

Authenticating requests

Include the full application API key in the X-API-KEY header on Application API requests, or pass it when initializing an SDK client. The key only authorizes operations for the user it is scoped to—requests for other users return an error.
If you do not pass an API key, or your API key is invalid, you’ll receive a 401 response code.

Deleting application API keys

Delete application API keys by ID with the Admin API. Use the UUID returned when the key was created.

Get Support

Want to get in touch with the Trophy team? Reach out to us via email. We’re here to help!