Suporte do 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 respostas (na página 1 de 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

Não consegue encontrar um certo filme ou série? Inicie sessão e adicione-o.

Geral

s focus the search bar
p abrir menu do perfil
esc close an open window
? open keyboard shortcut window

Em páginas de Média

b go back (or to parent when applicable)
e ir para a página de edição

Em páginas de temporadas de séries

(seta para a direita) ir para a próxima temporada
(seta para a esquerda) ir para a temporada anterior

Em Páginas de Episódios de Séries

(seta para a direita) ir para o próximo episódio
(seta para a esquerda) ir para o episódio anterior

Em Todas as Páginas de Imagens

a abrir janela para adicionar imagem

Em Todas as Páginas de Edição

t open translation selector
ctrl+ s submit form

Em Páginas de Discussão

n criar uma nova discussão
w toggle watching status
p toggle public/private
c toggle close/open
a abrir actividade
r reply to discussion
l ir para a última resposta
ctrl+ enter submit your message
(seta para a direita) página seguinte
(seta para a esquerda) página anterior

Definições

Deseja classificar ou adicionar este item a uma lista?

Iniciar Sessão

Ainda não é um membro?

Crie uma Conta e Adere a Comunidade