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 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.

映画やテレビ番組が見つかりませんか?ログインして作成してください。

全般

s 検索バーに移動する
p プロファイルメニューを開く
esc 開いているウィンドウを閉じる
? キーボードショートカットウィンドウを開く

メディアのページ

b 戻る(または該当する場合は親に)
e 編集ページに行く

テレビ番組のシーズンのページ

(右矢印)次のシーズンに行く
(左矢印)前のシーズンに戻る

テレビ番組のエピソードのページ

(右矢印)次のエピソードに進む
(左矢印)前のエピソードに戻る

全ての画像のページ

a 画像追加ウィンドウを開く

全ての編集ページ

t 翻訳選択を開く
ctrl+ s フォームを送信する

ディスカッションのページ

n 新しいディスカッションを作成する
w 監視ステータスを切り替える
p 公開/非公開を切り替える
c 閉じる/開くを切り替える
a アクティビティを開く
r ディスカッションに返信
l 最後の返事に行く
ctrl+ enter メッセージを送信する
(右矢印)次のページ
(左矢印)前のページ

設定

このアイテムを評価したり、リストに追加したりしたいですか?

ログイン

メンバーではありませんか?

登録してコミュニティに参加