Developers
Getting Started

Authentication

Understand Bearer tokens, API keys, and OAuth 2.1 patterns for the Rad TV API.

Protected GraphQL operations and all MCP calls require authentication through the Authorization header. The GraphQL ratings and genres queries are public, as are discovery and health endpoints.

Bearer Token

Every authenticated request uses the same header format:

Authorization: Bearer <credential>

Auth Methods

MethodBest For
API KeyDirect API access, scripts, server-side integrations
OAuth 2.1MCP clients (Claude, Cursor) acting with delegated access

API Keys

The simplest way to authenticate. Generate one from Developer Settings, then include it in every request.

See API Keys for details.

OAuth 2.1

For MCP clients that need delegated access. The flow uses PKCE (S256). OAuth access tokens currently authenticate MCP and its upload handoffs, not direct GraphQL requests.

Key endpoints:

  • Discovery: GET /.well-known/oauth-authorization-server
  • Register your app: POST /oauth/register
  • Authorize: GET /oauth/authorize
  • Get tokens: POST /oauth/token
  • Revoke access: POST /oauth/revoke

See MCP Server for the full OAuth connection flow.

Making Authenticated Requests

curl -X POST https://api.rad.live/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"query": "{ me { id username } }"}'
const API_KEY = 'YOUR_API_KEY';

const response = await fetch('https://api.rad.live/graphql', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${API_KEY}`,
  },
  body: JSON.stringify({
    query: '{ me { id username } }',
  }),
});

const { data, errors } = await response.json();
import requests

API_KEY = "YOUR_API_KEY"

response = requests.post(
    "https://api.rad.live/graphql",
    headers={
        "Content-Type": "application/json",
        "Authorization": f"Bearer {API_KEY}",
    },
    json={"query": "{ me { id username } }"},
)

result = response.json()
data = result.get("data")
errors = result.get("errors")

Troubleshooting

If a protected operation returns an authentication error:

  • Check that your API key is current and has not been replaced through regeneration
  • Make sure the header uses the Bearer prefix: Authorization: Bearer <key>
  • Verify you're calling https://api.rad.live (not a typo or old URL)
  • Confirm you have an active eligible subscription or trial — check your subscription
  • For OAuth, confirm the request is going through MCP rather than directly to GraphQL

Verify GraphQL authentication with the verifyConnection query. MCP clients should call the equivalent verify_connection tool. Both report identity, permissions, and YouTube connection status. See Quickstart.

Next steps

  • API Keys — Generate your first API key
  • Identifiers — Understand how resources are addressed