The Movie Database Support

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 replies (on page 1 of 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.

Can't find a movie or TV show? Login to create it.

Global

s focus the search bar
p open profile menu
esc close an open window
? open keyboard shortcut window

On media pages

b go back (or to parent when applicable)
e go to edit page

On TV season pages

(right arrow) go to next season
(left arrow) go to previous season

On TV episode pages

(right arrow) go to next episode
(left arrow) go to previous episode

On all image pages

a open add image window

On all edit pages

t open translation selector
ctrl+ s submit form

On discussion pages

n create new discussion
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r reply to discussion
l go to last reply
ctrl+ enter submit your message
(right arrow) next page
(left arrow) previous page

Settings

Want to rate or add this item to a list?

Login