Suport de The Movie Database

When using the authorization header, a call to https://api.themoviedb.org/3/account works (falls back to default id?).
however, a call to https://api.themoviedb.org/3/account?api_key=*** (without authorization header) doesn't work.

Is this by design? any other differences in using the header instead of query parameter?

2 resposta (a les pàgines 1 de 1)

Jump to last post

does anyone know?

Yes, this is intentional. The MovieDB API has different authentication levels:

1. Using the api_key in the URL
The api_key works for public requests, such as fetching movies or general information.
It does not work for requests that require user authentication.

2. Using the Authorization Header (Authorization: Bearer <token>)
Required for authenticated requests, like retrieving user-specific data (e.g., /account).
The API expects a user authentication token rather than just an API key.

3. Why does /account require authentication in the header?
The /account endpoint returns user-specific data.
An api_key alone is not enough because it does not identify a specific user.
Instead, the API requires an OAuth 2.0 Access Token.

How to fix it?

The user must generate an OAuth 2.0 Access Token and include it in the request header:

Authorization: Bearer <your_access_token>

This ensures the API knows which user account is making the request.

No trobeu una pel·lícula o una sèrie? Inicieu la sessió per a crear-la.

Global

s centra la barra de cerca
p obre el menú del perfil
esc tanca una finestra oberta
? obre la finestra de dreceres de teclat

A les pàgines de materials

b torna enrere (o la superior quan sigui aplicable)
e ves a la pàgina d’edició

A les pàgines de temporades

(fletxa dreta) ves a la temporada següent
(fletxa esquerra) ves a la temporada anterior

A les pàgines d'episodis

(fletxa dreta) ves a l'episodi següent
(fletxa esquerra) ves a l'episodi anterior

A totes les pàgines d'imatges

a obre la finestra d'afegir imatges

A totes les pàgines d'edició

t obre el selector de traducció
ctrl+ s envia el formulari

A les pàgines de debat

n crea un debat nou
w canvia l'estat de visualització
p canvia públic/privat
c tanca o obre
a obre activitat
r resposta al debat
l ves a la darrera resposta
ctrl+ enter envieu el vostre missatge
(fletxa dreta) pàgina següent
(fletxa esquerra) pàgina anterior

Configuracions

Desitgeu valorar o afegir aquest element a una llista?

Inicieu la sessió