Wsparcie 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 odpowiedzi (strona 1 z 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.

Nie możesz znaleźć filmu lub serialu? Zaloguj się, aby go utworzyć.

Globalny

s zaznacz pasek wyszukiwania
p otwórz menu profilu
esc Zamknij otwarte okno
? otwórz okno skrótów klawiszowych

On media pages

b go back (or to parent when applicable)
e przejdź do strony edycji

On TV season pages

(prawa strzałka) przejdź do następnego sezonu
(lewa strzałka) przejdź do poprzedniego sezonu

On TV episode pages

(prawa strzałka) przejdź do następnego odcinka
(lewa strzałka) przejdź do poprzedniego odcinka

On all image pages

a otwórz okno dodawania obrazu

On all edit pages

t open translation selector
ctrl+ s prześlij formularz

On discussion pages

n otwórz nową dyskusję
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r odpowiedz na dyskusję
l przejdź do ostatniej odpowiedzi
ctrl+ enter wyślij swoją wiadomość
(prawa strzałka) następna strona
(lewa strzałka) poprzednia strona

Ustawienia

Want to rate or add this item to a list?

Zaloguj