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:
read token
) is to be used as an API key and only grant read access for v4
api_key
serves the same purpose forv3
write token
) is to be used for Account & List endpoints in v4
session_id
is to be used for Account & List endpoints in v3
Guest session_id
is only for rating shows/movies/episodes in v3
However, it seems that:
read-only token
for v4
grants access to all accounts & lists endpoints in v3
or v4
regardless (for GET at least, not POST/DELETE it seems)session_id + api_key
works on v4
endpoints (without v4 read or write token)account_id
query parameters for those endpoints are ignored in favour of the token
or session id
holderSo in the end I'm confused about which token I should use.
v4 access token
or session_id+api_key
interchangeably for all endpoints? Same for api_key
and read-only token
?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
?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 :)
Non riesci a trovare un film o una serie Tv? Accedi per crearlo.
Vuoi valutare o aggiungere quest'elemento a una lista?
Non sei un membro?
Risposta da Travis Bell
il 12 febbraio, 2024 alle 11:20AM
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.
Risposta da younes60
il 7 luglio, 2024 alle 5:29PM
but im able to mark a movie as favorite on any account without session_id or access_token but only with api key