دعم الموقع

Hello,

I am trying to work my way through a tutorial that executes movie searches with the API, and I keep getting 401 results, so I am unable to proceed any further. My URL that I am sending with my http request is: http://api.themoviedb.org/3/Movie.search/en/xml/[API KEY]/gladiator

Is there something I am doing wrong in the formatting of the URL? I have a valid API Key.

Thanks, Shaun

2 ردود (على هذه الصفحة 1 من 1)

Jump to last post

Hi Shaun,

A few things. First, you're not making a valid APi request. The movie search URL is:

http://api.themoviedb.org/3/search/movie?api_key=###&query=gladiator

Second, a 401 error would be caused from not sending a valid Accept header. If you take a look at our documentation and depending what language you are programming in, there's working examples for most popular ones. A working cURL request for example, looks like so:

curl --include --header "Accept: application/json" "http://api.themoviedb.org/3/search/movie?api_key=###&query=gladiator"

Cheers.

I was a bit confused by the documentation regarding constructing a request URL. There's info on the endpoints, but not on how they fit into the URL itself. Just an idea for improvement going forward.

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

عام

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

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

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

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

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

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

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

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

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

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

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

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

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

الاعدادات

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

تسجيل الدخول