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?
لم تجد الفلم أو المسلسل ؟ سجل دخولك و انشئها
هل تريد تقييم او اضافة هذا العنصر للقائمة؟
لست عضو؟
رد بواسطة djmtype
بتاريخ مارس 26, 2021 في 5:25 مساءا
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!
رد بواسطة Travis Bell
بتاريخ مارس 28, 2021 في 11:04 صباحا
Good run through, thanks @djmtype.
رد بواسطة Simanta108
بتاريخ فبراير 28, 2022 في 3:30 صباحا
Did everything right upto 2, but postman is showing session denied status message, what should I do in that case?
رد بواسطة Travis Bell
بتاريخ مارس 1, 2022 في 10:34 صباحا
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.
رد بواسطة fabiantorresm
بتاريخ سبتمبر 13, 2022 في 12:11 مساءا
Thank you Travis Bell