Skip to main content

Overview

The Qovery API uses Bearer token authentication. You need an API token to make authenticated requests to the API.

Creating an API Token

Via Qovery Console

  1. Log in to the Qovery Console
  2. Navigate to Organization Settings
  3. Click on API Tokens
  4. Click Generate Token
  5. Give your token a descriptive name
  6. Set token permissions and expiration
  7. Click Create and save the token securely
API tokens are displayed only once. Store them securely - treat them like passwords.

Token Scopes

When creating a token, you can configure these scopes:

Making Authenticated Requests

Include your API token in the Authorization header:

Authentication Methods

Using cURL

Using Python

Using JavaScript/TypeScript

Using Go

Using Official SDKs

Python SDK

JavaScript/TypeScript SDK

Environment Variables

Store your API token securely using environment variables:

Linux/macOS

Add to your .bashrc, .zshrc, or .env file:
Load environment variables:

Windows PowerShell

Docker

Pass as environment variable:

Kubernetes

Create a secret:
Use in deployment:

Authentication Errors

401 Unauthorized

Token is missing or invalid:
Solution: Verify your token is correct and included in the Authorization header.

403 Forbidden

Token doesn’t have required permissions:
Solution: Check token scopes and ensure you have the required permissions.

Token Security Best Practices

Always use environment variables or secrets management tools. Add .env files to .gitignore.
Create tokens with only the permissions needed for their specific use case.
Set expiration dates and rotate tokens periodically for security.
Regularly review API token activity in the Qovery Console.
Delete tokens that are no longer needed or potentially compromised.
Create different tokens for development, staging, and production.

Testing Authentication

Test your authentication setup:
Expected response:

Next Steps

API Examples

See practical examples of using the authenticated API