Skip to Content
TorBox API

Authentication

API keys, the Bearer header, the token query parameter, and Sign in with TorBox.

API key

Your API key is on your TorBox settings page under API key. Copy it, or refresh it to get a new one. The key gives full access to your account, so keep it out of source control and client-side code.

Bearer header

Most endpoints take the key in the Authorization header:

Authorization: Bearer <your api key>

Use Get User Data to verify your key.

Loading request example… View endpoint

A missing key is answered with 401 NO_AUTH, a wrong one with 401 BAD_TOKEN. A good key that is not allowed to do something (for example because of the plan) gets 403. See Errors.

The download link endpoints (/torrents/requestdl, /usenet/requestdl, /webdl/requestdl and their /batch variants) take the key as the token query parameter instead:

https://api.torbox.app/v1/api/torrents/requestdl?token=APIKEY&torrent_id=NUMBER&file_id=NUMBER&redirect=true

With redirect=true this URL works as a permalink that redirects to the CDN link. To invalidate such permalinks, reset your API key or delete the item from your dashboard.

A URL with token= contains your key. Share it only with people you would give your key to.

Device code flow

For TVs and other devices where typing a key is hard, apps can obtain a user's key with the device code flow (GET /v1/api/user/auth/device/start, then POST /v1/api/user/auth/device/token). The steps are described on Start Device Code Authorization and Get Token From Device Code.

Sign in with TorBox (OAuth)

TorBox runs an OAuth 2.0 authorization server for MCP clients and other apps:

Metadatahttps://api.torbox.app/.well-known/oauth-authorization-server
Client registrationPOST https://api.torbox.app/register (RFC 7591)
Authorizationhttps://api.torbox.app/authorize (authorization code, PKCE S256 required)
TokenPOST https://api.torbox.app/token

The user approves the request on torbox.app/oauth/device. The access token you receive is the user's API key: there is no refresh token and it does not expire. Use it exactly like a key, in the Authorization: Bearer header.

Signing in on this site

The Sign in with TorBox button in the header uses that same flow. After you approve, this site:

  • keeps your key only in an encrypted, httpOnly session cookie (never in localStorage), and never logs it,
  • fills it into the API reference playground, so "Send" runs requests against your account,
  • forgets it when you click Sign out (the cookie is deleted).

Resetting your API key in the TorBox settings revokes it everywhere, including this site and every app you approved. Signing out here only deletes this site's copy.

The docs are fully readable without signing in.

On this page