دعم الموقع

Hey, For the last couple of days, I have been struggling to use the /3/search/movie with special characters from the Arabic, Chinese, or Korean alphabet.

When I try to run a query directly like https://api.themoviedb.org/3/search/movie?query=%EB%8F%99%EB%84%A4%EC%82%AC%EB%9E%8C%EB%93%A4&api_key=[APIKEY] it works fine

But when I try to get it from my app, I get "Bad Request" and nothing more. Without special characters, it works fine. I do not use any special headers in my call.

Could this be the encoding problem? I can see that even up here, the query "동네사람들" is URL encoded.

I tried to simulate through https://developer.themoviedb.org/reference/search-movie, but even with my valid credentials, I got "Invalid API key: You must be granted a valid key." This error usually happens when you DO NOT use the parameter api_key as the last parameter, which is also strange :)

Thanks for any advice

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

Jump to last post

@winebago said:
Bad request when search with special charaters
Hey,
For the last couple of days, I have been struggling to use the /3/search/movie with special characters from the Arabic, Chinese, or Korean alphabet.
When I try to run a query directly like
https://api.themoviedb.org/3/search/movie?query=%EB%8F%99%EB%84%A4%EC%82%AC%EB%9E%8C%EB%93%A4&api_key=[APIKEY]
it works fine
But when I try to get it from my app, I get "Bad Request" and nothing more.
Without special characters, it works fine. I do not use any special headers in my call.
Could this be the encoding problem?

Yes, it is probably a problem with your APP's coding.
If so, only the APP creator can solve the problem.
If it is a problem here at TMDb, only the admin Travis Bell will be able to explain it.
Let's wait for him to come by.

I can see that even up here, the query "동네사람들" is URL encoded.
I tried to simulate through
https://developer.themoviedb.org/reference/search-movie,
but even with my valid credentials, I got "Invalid API key: You must be granted a valid key."
This error usually happens when you DO NOT use the parameter api_key as the last parameter, which is also strange :)
Thanks for any advice

Your page probably has the API Key option selected.
In the menus on the right side, under Authorization > Header,
change the dropdown option from "API Key Auth" to "Access Token Auth".
It never worked with the API Key option.
Only with the Access Token option.
I don't know if this will ever be fixed.
I believe it is a limitation of the external service.

Thank you.

I have already tried to change the encoding, and it works in 95% of cases.

So is there still a case where it's not working? If so, what is the full request that is triggering a 400 error?

Thanks for the question; the remaining cases not properly working look like this:

That's because it's a TV show, and you're searching for movies with your API call.

https://api.themoviedb.org/3/search/tv?api_key=###&query=kita+meil%C4%97

Works properly, as does using multi:

https://api.themoviedb.org/3/search/multi?api_key=###&query=kita+meil%C4%97

Cheers.

Oh, that's it, thanks!

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

عام

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

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

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

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

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

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

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

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

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

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

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

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

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

الاعدادات

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

تسجيل الدخول