Telebase Docs

Authentication

Every HTTP request to your Telebase instance must be authenticated.

API Keys

You can create projects inside your Telebase Dashboard. Each project generates a unique API key that scopes data specifically to that project.

Passing the API Key

Include the key in the x-api-key header for POST requests, or as an apiKey query parameter for GET downloads.

const response = await fetch('https://telebase.pages.dev/api/db', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'tb_live_xxxxxxxxxxxxxxxxxxxx'
  },
  body: JSON.stringify({ ... })
});