Sprijin Bază de date filme (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 răspunsuri (pe pagina 1 din 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

Nu găsiți un film sau un serial? Autentificați-vă pentru a-l crea.

Globale

s focalizează bara de căutare
p deschide meniul profilului
esc închide o fereastră deschisă
? deschide fereastra cu scurtături de la tastatură

Pe paginile media

b mergi înapoi (sau la părinte atunci când este cazul)
e mergi la pagina de editare

Pe paginile sezoanelor filmelor seriale

(săgeată dreapta) mergi la sezonul următor
(săgeată stânga) mergi la sezonul precedent

Pe paginile episoadelor filmelor seriale

(săgeată dreapta) mergi la episodul următor
(săgeată stânga) mergi la episodul precedent

Pe toate paginile de imagini

a deschide fereastra pentru adăugarea de imagini

Pe toate paginile de editare

t deschide selectorul de traduceri
ctrl+ s trimite formularul

Pe paginile de discuții

n crează o discuție nouă
w comută starea de vizionare
p comută publică/privată
c comută închisă/deschisă
a deschide activitatea
r răspunde la discuție
l mergi la ultimul răspuns
ctrl+ enter trimite mesajul
(săgeată dreapta) pagina următoare
(săgeată stânga) pagina precedentă

Setări

Doriți să evaluați sau să adăugați acest articol într-o listă?

Autentificare