Служба підтримки 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 відповідей (на сторінці 1 із 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

Не вдалося знайти фільм або серіал? Увійдіть, щоб додати.

Загальні

s відкрити панель пошуку
p відкрити меню профілю
esc закрити відкрите вікно
? відкрити вікно з гарячими клавішами

На сторінках медіа

b повернутися назад
e перейти до сторінки редагування

На сторінках сезонів шоу

(стрілка вправо) перейти до наступного сезону
(стрілка вліво) перейти до попереднього сезону

На сторінках серій шоу

(стрілка вправо) перейти до наступної серії
(стрілка вліво) перейти до попередньої серії

На всіх сторінках зображень

a відкрити вікно додавання зображення

На всіх сторінках редагування

t відкрити перемикач перекладів
ctrl+ s підтвердити форму

На сторінках обговорення

n створити нове обговорення
w змінити статус стеження
p перемикач публічно/приватно
c перемикач відкрито/закрито
a відкрити активність
r відповісти на обговорення
l перейти до останньої відповіді
ctrl+ enter підтвердити повідомлення
(стрілка вправо) наступна сторінка
(стрілка вліво) попередня сторінка

Налаштування

Хочете оцінити чи додати до списку?

Увійти

Немає облікового запису?

Приєднайтеся до спільноти