The Movie Database Support

Hi, I try to add movie with id 767 (Harry Potter) to user's list. But I get an error with code 34. What is media_type and media_id?

My request:
curl --request POST \ --url https://api.themoviedb.org/4/{USER_LIST_ID}/items \ --header 'Authorization: Bearer {JWT_USER_TOKEN}' \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data ' { "items": [ { "media_type": "movie", "media_id": 767 } ] } '

Thanks

1 reply (on page 1 of 1)

Jump to last post

@egdevelop said:
how to use add items to list? API v4
Hi, I try to add movie with id 767 (Harry Potter) to user's list.
But I get an error with code 34.
What is media_type and media_id?

My request:
curl --request POST \ --url https://api.themoviedb.org/4/{USER_LIST_ID}/items \ --header 'Authorization: Bearer {JWT_USER_TOKEN}' \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data ' { "items": [ { "media_type": "movie", "media_id": 767 } ] } '

Thanks

I do not master the use of TOKEN or v4.
But I can clarify two things.

Error 34:

34  401     The resource you requested could not be found.

See here: https://developer.themoviedb.org/docs/errors
Apparently he couldn't find his list.
Probably your USER_LIST_ID has some error.

media_type
It can be movie type or tv type (TV Show)

media_id
In this case, this TMDb ID 767 is the movie ID
Harry Potter and the Half-Blood Prince (2009)
See the 767 in the movie's URL:

https://www.themoviedb.org/movie/767-harry-potter-and-the-half-blood-prince

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