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?
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by djmtype
on March 26, 2021 at 5:25 PM
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.https://developers.themoviedb.org/3/authentication/how-do-i-generate-a-session-id
and follow these instructions.GET
versus aPOST
request.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:
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 youraccount_id
:Enjoy!
Reply by Travis Bell
on March 28, 2021 at 11:04 AM
Good run through, thanks @djmtype.
Reply by Simanta108
on February 28, 2022 at 3:30 AM
Did everything right upto 2, but postman is showing session denied status message, what should I do in that case?
Reply by Travis Bell
on March 1, 2022 at 10:34 AM
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.
Reply by fabiantorresm
on September 13, 2022 at 12:11 PM
Thank you Travis Bell