The Movie Database Support

I read the docs here: https://developers.themoviedb.org/3/account/get-favorite-movies

/account/{account_id}/favorite/movies

Is the {account_id} seems to require an Int so it's not the same as the username, and I can't find it anywhere under my profile. Where can I find this info?

My Favorites list is set to public too, so I'm guessing I don't need to set a bearer token, right?

5 replies (on page 1 of 1)

Jump to last post

How to obtain your account_id

There needs to be a good tutorial on how to retrieve the account_id because there's several steps on how to get there.

  • You need to start here: https://developers.themoviedb.org/3/authentication/how-do-i-generate-a-session-id and follow these instructions.
  • Use Postman instead of the on-page generator, otherwise you may run into CORS issues.
  • Be sure to pay attention to what is a GET versus a POST request.
  • You'll need your API key for everything so be sure to create an app if you haven't already. https://www.themoviedb.org/settings/api

I'll try to recall the steps –

1. Get your Request Token (docs)

https://api.themoviedb.org/3/authentication/token/new?api_key=blahblahblah

Plug that URL into Postman as a GET request and run it.

You should now have your Request Token.

2. Create your session_id

https://api.themoviedb.org/3/authentication/session/new?api_key=blahblahblah

Add that to Postman as a POST Request. Also within Postman's Body tab, you need to add your request_token as raw JSON.

It will look something like the following:

{
  "request_token": "xxxxxxxxxxxxxx"
}

Run the request and should get back your session_id.

3. Retrieve your account details (docs)

Back in Postman add your URL as GET request.

https://api.themoviedb.org/3/account?api_key=blahblahblah&session_id=xxxxxxxxxxx

This should return some JSON, and within it the id which is your account_id:

{
    "avatar": {
        "gravatar": {
            "hash": "00000000000000000"
        },
        "tmdb": {
            "avatar_path": null
        }
    },
    "id": 1234567,
    "iso_639_1": "en",
    "iso_3166_1": "US",
    "name": "",
    "include_adult": true,
    "username": "meme"
}

Enjoy!

Good run through, thanks @djmtype.

Did everything right upto 2, but postman is showing session denied status message, what should I do in that case?

You can check out some test scripts I have below, which have all the functionality to get this done. All of the code is client side JS so inspect the code to see what's happening.

Cheers.

@travisbell said:

You can check out some test scripts I have below, which have all the functionality to get this done. All of the code is client side JS so inspect the code to see what's happening.

Cheers.

Thank you Travis Bell

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