Skip to main content
The Gately API uses API key authentication. Your API key contains the project context, so authentication is simple and straightforward.

API Keys

API keys are used for all API communication. They provide full access to your project’s data and automatically include the project context.

Creating an API Key

  1. Go to your Gately dashboard
  2. Navigate to Settings > API Keys
  3. Click Create API Key
  4. Give your key a descriptive name
  5. Copy and securely store the key (it won’t be shown again)

Using API Keys

Include the API key in the Authorization header:
Never expose API keys in client-side code. They should only be used in server-side applications.

API Key Prefixes

JWT Tokens (Client-side)

JWT tokens are used for client-side authentication when users log in to your application.

Obtaining a JWT Token

Using JWT Tokens

Token Expiry

Refreshing Tokens

Or via API:

Authentication Summary

Security Best Practices

Create new API keys periodically and revoke old ones to minimize risk.
Store API keys in environment variables, never in source code.
Create separate keys for different services with minimal required permissions.
Regularly review API key usage in your dashboard to detect anomalies.

Error Responses

Invalid Token

Missing Authentication