Υποστήριξη για το 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 απαντήσεις(στη σελίδα 1 από 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.

Δεν μπορείτε να βρείτε κάποια ταινία ή σειρά; Συνδεθείτε για να τη δημιουργήσετε.

Σε όλες τις σελίδες

s Εστίαση στη μπάρα αναζήτησης
p Άνοιγμα μενού προφίλ
esc Κλείσιμο ανοιχτού παραθύρου
? Άνοιγμα παραθύρου συντομεύσεων πληκτρολογίου

Στις σελίδες μέσων

b Επιστροφή στην προηγούμενη σελίδα(ή στην αρχική σελίδα όταν είναι εφικτό)
e Μετάβαση στη σελίδα επεξεργασίας

Στις σελίδες κύκλων σειρών

(Δεξιό βέλος) Μετάβαση στον επόμενο κύκλο
(Αριστερό βέλος) Μετάβαση στον προηγούμενο κύκλο

Στις σελίδες επεισοδίων σειρών

(Δεξιό βέλος) Μετάβαση στο επόμενο επεισόδιο
(Αριστερό βέλος) Μετάβαση στο προηγούμενο επεισόδιο

Σε όλες τις σελίδες εικόνων

a Άνοιγμα παραθύρου προσθήκης εικόνας

Σε όλες τις σελίδες επεξεργασίας

t Άνοιγμα επιλογέα μετάφρασης
ctrl+ s Υποβολή φόρμας

Στις σελίδες συζήτησης

n Δημιουργία νέας συζήτησης
w Ρύθμιση κατάστασης παρακολούθησης
p Ρύθμιση ως δημόσια/ιδιωτική
c Ρύθμιση ανοίγματος/κλεισίματος
a Άνοιγμα δραστηριότητας
r Απάντηση στη συζήτηση
l Μετάβαση στην τελευταία απάντηση
ctrl+ enter Υποβολή μηνύματος
(Δεξιό βέλος) Επόμενη σελίδα
(Αριστερό βέλος) Προηγούμενη σελίδα

Ρυθμίσεις

Θέλετε να αξιολογήσετε ή να προσθέσετε αυτό το στοιχείο σε μια λίστα;

Σύνδεση