Skip to main content

API Authentication

The Turnix API uses Bearer tokens for authorization. These tokens can be created via the API Tokens section in your Turnix Console.


🔐 Overview

A Bearer token is a secure string that authenticates your application’s requests to the Turnix API. When making requests, you must include the following header:

Authorization: Bearer YOUR_ACCESS_TOKEN

Bearer tokens must be treated like passwords:

  • Keep them confidential
  • Never commit them to version control
  • Store them securely (e.g., environment variables or secrets managers)

🎫 Obtaining API Tokens

  1. Login to the Turnix Console
  2. Navigate to your Project → API Tokens section
  3. Click "Create new API Token"
  4. Copy and store the token securely
Save your token

The token is only shown once - immediately after creation. Once the window is closed, it cannot be retrieved again. Be sure to copy and store it securely.


🧪 Using the Token

For any API request requiring authentication, add the following header:

Authorization: Bearer YOUR_ACCESS_TOKEN

Here’s an example showing a request using a Bearer token:

curl -X POST \
https://turnix.io/api/v1/credentials/ice \
-H 'Authorization: Bearer YOUR_API_BEARER_TOKEN' \
-H 'Content-Type: application/json'

A valid token will authorize the request. Invalid or missing tokens will result in:

  • 401 Unauthorized: Missing or malformed token
  • 403 Forbidden: Token is valid but lacks required permissions