Suport de The Movie Database

Hi

I’ve a new problem. The /3/list/{id}/add_item method returns a 403 code when I try to add a movie which is already in the list. (it works perfectly when the movie is not already in the list.)

Here the query: http://api.themoviedb.org/3/list/51c991a719c29575b200e5e0/add_item?api_key=##############&session_id=##############

And the JSON body:

{"media_id":550}

Thanks.

3 resposta (a les pàgines 1 de 1)

Jump to last post

Hey Dave,

I can't seem to replicate this. Here's my example cURL query. The first call responds with a status_code: 12 and every subsequent call responds with a status_code: 8.

curl -H "Accept: application/json" -H "Content-Type: application/json" -d "{'media_id': 550}" \
"http://api.themoviedb.org/3/list/51cd920219c2951e0302b715/add_item?api_key=###&session_id=###"

Strange … I can reproduce it (tested it now again.)

Here is what I’ve done:

 1) Added a movie (550  Fight Club) to one of my lists (Id  51c991a719c29575b200e5e0).

 2) Sent request to TMDb API

           http://api.themoviedb.org/3/list/51c991a719c29575b200e5e0/add_item?api_key=########&session_id=###########

 3) Received the following response:
           The remote server returned an error: (403) Forbidden.


 4) Now I’ve removed (manually, using the website) the movie (550) from my list.

 5) Sent the same request again:
            http://api.themoviedb.org/3/list/51c991a719c29575b200e5e0/add_item?api_key=########&session_id=###########

 6) Received the following response:
           {"status_code":12,"status_message":"The item/record was updated successfully"}

  7)    Sent the same request again:
            http://api.themoviedb.org/3/list/51c991a719c29575b200e5e0/add_item?api_key=########&session_id=###########

  8)    Received the following response:
            The remote server returned an error: (403) Forbidden.

…and so on.

Aha! Your other post got me thinking about this.

Yes, the response code is 403 but if you take a look at the response, we're responding with the proper response.

Looking through the w3 docs, I'd say this is likely the correct response code.

No trobeu una pel·lícula o una sèrie? Inicieu la sessió per a crear-la.

Global

s centra la barra de cerca
p obre el menú del perfil
esc tanca una finestra oberta
? obre la finestra de dreceres de teclat

A les pàgines de materials

b torna enrere (o la superior quan sigui aplicable)
e ves a la pàgina d’edició

A les pàgines de temporades

(fletxa dreta) ves a la temporada següent
(fletxa esquerra) ves a la temporada anterior

A les pàgines d'episodis

(fletxa dreta) ves a l'episodi següent
(fletxa esquerra) ves a l'episodi anterior

A totes les pàgines d'imatges

a obre la finestra d'afegir imatges

A totes les pàgines d'edició

t obre el selector de traducció
ctrl+ s envia el formulari

A les pàgines de debat

n crea un debat nou
w canvia l'estat de visualització
p canvia públic/privat
c tanca o obre
a obre activitat
r resposta al debat
l ves a la darrera resposta
ctrl+ enter envieu el vostre missatge
(fletxa dreta) pàgina següent
(fletxa esquerra) pàgina anterior

Configuracions

Desitgeu valorar o afegir aquest element a una llista?

Inicieu la sessió