Supporto The Movie Database

Hello !

First, thanks for all the hard work on the documentation and API !

I'm trying to set up my auth flow for the Tmdb API, however, I'm struggling to understand the exact authorisation scope of the various tokens.

From my understanding of the documentation:

  1. The Read Only Access Token (read token) is to be used as an API key and only grant read access for v4
  2. The api_key serves the same purpose forv3
  3. The Access Token (write token) is to be used for Account & List endpoints in v4
  4. The session_id is to be used for Account & List endpoints in v3
  5. The Guest session_id is only for rating shows/movies/episodes in v3

However, it seems that:

  1. The read-only token for v4grants access to all accounts & lists endpoints in v3 or v4 regardless (for GET at least, not POST/DELETE it seems)
  2. The session_id + api_key works on v4 endpoints (without v4 read or write token)
  3. All account_id query parameters for those endpoints are ignored in favour of the token or session id holder

So in the end I'm confused about which token I should use.

  1. Can I use v4 access token or session_id+api_key interchangeably for all endpoints? Same for api_key and read-only token ?
  2. What is the point of converting a write token to a session id if the former works as is?
  3. Are all GET endpoints for Account & Lists accessible with read-only tokens? If so doesn't that mean I leak the api_key account's holder information if I bundle my app with a read-only token instead of api_key?
  4. What is the point of object_account_id (v4) and account_id (v3) if the return is based on the auth token holder?

Thanks for any insight you can provide :)

2 risposte (nella pagina 1 di 1)

Jump to last post

Hi @dvcol,

The v3 API key and v4 access token can be treated as one and the same. They provide access to any of the public read methods. For example, unless a list is marked as private, either way of authenticating can be used to get a list. Lists are public by default so this would be the case for the vast majority of lists.

A session ID, or user authorized access token is required to do any user specific actions like rate a movie, or access private lists.

@travisbell said:

Hi @dvcol,

The v3 API key and v4 access token can be treated as one and the same. They provide access to any of the public read methods. For example, unless a list is marked as private, either way of authenticating can be used to get a list. Lists are public by default so this would be the case for the vast majority of lists.

A session ID, or user authorized access token is required to do any user specific actions like rate a movie, or access private lists.

but im able to mark a movie as favorite on any account without session_id or access_token but only with api key

Non riesci a trovare un film o una serie Tv? Accedi per crearlo.

Globale

s focalizza la barra di ricerca
p apri menu profilo
esc chiudi una finestra aperta
? apri finestra scorciatoia tastiera

Su tutte le pagine di media

b torna indietro (o al precedente quando applicabile)
e vai alla pagina di modifica

Nelle pagine delle stagioni TV

(freccia destra) vai alla stagione successiva
(freccia sinistra) vai alla stagione precedente

Nelle pagine degli episodi TV

(freccia destra) vai all'episodio successivo
(freccia sinistra) vai all'episodio precedente

Su tutte le pagine di immagini

a apri finestra aggiungi immagine

Su tutte le pagine di modifica

t apri selettore traduzione
ctrl+ s invia modulo

Sulle pagine di discussione

n crea nuova discussione
w segna come visto/non visto
p cambia publico/privato
c cambia chiuso/aperto
a apri attivita
r rispondi alla discussione
l vai all'ultima risposta
ctrl+ enter invia il tuo messaggio
(freccia destra) pagina successiva
(freccia sinistra) pagina precedente

Impostazioni

Vuoi valutare o aggiungere quest'elemento a una lista?

Accedi