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?
Film of tv-serie niet gevonden? Meld je aan om deze toe te voegen.
Want to rate or add this item to a list?
Not a member?
Reactie van djmtype
op 26 maart 2021 om 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!
Reactie van Travis Bell
op 28 maart 2021 om 11:04 AM
Good run through, thanks @djmtype.
Reactie van Simanta108
op 28 februari 2022 om 3:30 AM
Did everything right upto 2, but postman is showing session denied status message, what should I do in that case?
Reactie van Travis Bell
op 1 maart 2022 om 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.
Reactie van fabiantorresm
op 13 september 2022 om 12:11 PM
Thank you Travis Bell