Skip to main content

Overview

The Streambird Auth API uses Bearer token authentication. All Users, Phone Numbers, Emails, and OTPs are associated with an App as the container. Most endpoints require your App’s Secret API Key, while certain client-side endpoints (used via SDK) accept a Public Token instead.

API Keys

Streambird provides two types of API keys:
  • Secret API Keys (sk_test_... or sk_live_...) - Used for server-side API calls. Keep these secure and never expose them in client-side code.
  • Public Tokens - Used for client-side SDK integration. Safe to use in frontend applications.
Never share your secret API keys in publicly accessible areas such as GitHub, client-side code, or browser inspector.

Making Authenticated Requests

Include your API key in the Authorization header of your requests using the Bearer scheme:

Header Format

Authorization: Bearer {api_key}

Example Request

curl -X GET https://api.streambird.io/v1/auth/users/user_24wFP9pDa9YiMJLun94iKykoZs2 \
  -H "Authorization: Bearer sk_test_pRqweh3wvWmJAAVYv7Z0T5iPLzFM4ql0muoyQcjOxGeN3p1r"

Example with JavaScript

const response = await fetch('https://api.streambird.io/v1/auth/users/user_24wFP9pDa9YiMJLun94iKykoZs2', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer sk_test_pRqweh3wvWmJAAVYv7Z0T5iPLzFM4ql0muoyQcjOxGeN3p1r',
    'Content-Type': 'application/json'
  }
});

const data = await response.json();

Example with Python

import requests

url = "https://api.streambird.io/v1/auth/users/user_24wFP9pDa9YiMJLun94iKykoZs2"
headers = {
    "Authorization": "Bearer sk_test_pRqweh3wvWmJAAVYv7Z0T5iPLzFM4ql0muoyQcjOxGeN3p1r",
    "Content-Type": "application/json"
}

response = requests.get(url, headers=headers)
data = response.json()

Test vs Live Keys

  • Test Keys (sk_test_...) - Use these keys for development and testing. They won’t affect production data.
  • Live Keys (sk_live_...) - Use these keys for production. All operations will affect real users and data.

Getting Your API Keys

You can find your API keys in the Streambird Dashboard:
  1. Log in to your Streambird Dashboard
  2. Navigate to SettingsAPI Keys
  3. Copy your test or live API key
  4. Use it in your API requests as shown above
Rotate your API keys regularly and immediately revoke any keys that may have been compromised.