دعم الموقع

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 ردود (على هذه الصفحة 1 من 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

لم تجد الفلم أو المسلسل ؟ سجل دخولك و انشئها

عام

s ركز شريط البحث
p افتح قائمة الملف الشخصي
esc اغلق النافذة المفتوحة
? افتح نافذة اختصارات لوحة المفاتيح

على كافة صفحات الوسائط

b ارجع للخلف (او للصفحة الام عند التطبيق)
e انتقل لصفحة التعديل

على كافة صفحات موسم المسلسل

(السهم الايمن) انتقل للموسم التالي
(السهم الايسر) انتقل للموسم السابق

على كافة صفحات حلقة المسلسل

(السهم الايمن) انتقل للحلقة التالية
(السهم الايسر) انتقل للحلقة السابقة

على كافة صفحات الصور

a افتح صفحة اضافة الصورة

على كافة صفحات التعديل

t افتح محدد الترجمة
ctrl+ s ارسال النموذج

على صفحات المناقشة

n انشى نقاش جديد
w تبديل حالة المتابعة
p تبديل عام / خاص
c تبديل اغلاق / فتح
a افتح الانشطة
r رد على النقاش
l انتقل لأخر رد
ctrl+ enter أرسل رسالتك
(السهم الايمن) الصفحة التالية
(السهم الايسر) الصفحة السابقة

الاعدادات

هل تريد تقييم او اضافة هذا العنصر للقائمة؟

تسجيل الدخول