Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.discovr.media/llms.txt

Use this file to discover all available pages before exploring further.

Get started

This page is a short path to your first successful call. For the full SDK walkthrough (TypeScript, Kotlin, Swift), use Authentication.

Prerequisites

  • A Client ID for your application (created in the Discovr dashboard).
  • curl or any HTTP client for the steps below.

1. Sign in to get credentials

Discovr has two sign-in flows. Choose one:
  • Web flow — For web apps and mobile browsers. Redirect to login, get back a refresh token.
  • Device code flow — For TVs and devices without a browser. Display a code, user signs in elsewhere, you poll for the refresh token.
See Authentication for full SDK examples. Refresh token with curl: Follow the device code flow using your app’s Client ID and API base URL (production https://api.discovr.media, or your emulator hosting URL such as http://localhost:5005). There is no shortcut endpoint for tokens—use the same sign-in flows locally and in production.

2. Call the API with curl

Base URL: https://api.discovr.media (or your project’s Functions URL in the emulator). List profiles — use the refresh token:
curl -sS "https://api.discovr.media/profiles" \
  -H "Authorization: Bearer YOUR_REFRESH_TOKEN"
Get a session token — post the profile you want to browse:
curl -sS -X POST "https://api.discovr.media/auth/session-token" \
  -H "Authorization: Bearer YOUR_REFRESH_TOKEN" \
  -H "Content-Type: application/json" \
  -d ‘{ "profileId": "prof_..." }’
# Returns: { "sessionToken": "..." }
Create a page — use the session token:
curl -sS -X POST "https://api.discovr.media/pages" \
  -H "Authorization: Bearer YOUR_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d ‘{}’

3. Device code flow (curl sketch)

Request a code:
curl -sS -X POST "https://api.discovr.media/auth/device-codes" \
  -H "Content-Type: application/json" \
  -d '{"clientID":"your-client-id"}'
Poll until the user has authorized (GET; expect 401 while pending, 200 when ready):
curl -sS "https://api.discovr.media/auth/device-codes/DEVICE_CODE_FROM_RESPONSE/token"
When authorized, the response includes refreshToken, publicId, and expiresAt. Then call POST /auth/session-token with your chosen profileId to obtain a session token. See Authentication for end-to-end SDK examples. Local emulators: Emulator seed data usually includes a Firebase test user and a Client ID you can place in app env (VITE_CLIENT_ID). Run the device-code or web flow against the emulator base URL, then call POST /auth/session-token as above.

Next steps

Pages overview

Hero, rows, default Home/Movies/Series tabs, and stack navigation basics

Rows overview

Four row types, item discriminators, and loading rails with the SDK

Media details

Catalog, images, TV seasons/episodes, and similar titles after a tap

Profile context

Lists, resume queue, overlays, scrobbling on /profile/* after profile selection

Authentication guide

Sign-in, profile selection, session vs identity calls, and SDK tabs

Request a device code

OpenAPI reference for device codes

Create session token

Exchange refresh token + profileId for a session credential

Type reference

Shared wire shapes for rows, row items, profiles, auth state

Need help?