دعم الموقع

Did something change? I am normally expecting a JSON response that has success assigned a value of 1 or true but now it outputs nothing when I test it in command prompt. Even weirder, when I go to the official API docs here to test it out the response I get is literally "OK". That's it. Two characters, def not in JSON format. To be clear I get "OK" as the response when I click "Try It!". Take note this is not the same format as expected since the successful application/json response example that is provided looks as one would expect. (website calls it "200 - Result example" in the drop down)

However, whenever I purposely use a wrong API key I get a proper failure response that is in JSON format. Failure responses still behaves as expected on the API doc testing page too.

I want to make it clear my API key works fine. I can use it for all queries I try. Only the API Key Validate Key query is the one giving me this trouble.

Any insight on what is going on here? Why would I no longer be receiving a JSON response when it's successful using this query? Is this some new expectation, that we are to assume it's successful if said response is empty? I get I can see "HTTP/1.1 200 OK" using the verbose output but that isn't the traditional JSON format response I've come to expect.

C:\Users\Scott>curl -v https://api.themoviedb.org/3/authentication?api_key=###
* Host api.themoviedb.org:443 was resolved.
* IPv6: (none)
* IPv4: 52.85.151.48, 52.85.151.28, 52.85.151.18, 52.85.151.24
*   Trying 52.85.151.48:443...
* Connected to api.themoviedb.org (52.85.151.48) port 443
* schannel: disabled automatic use of client certificate
* ALPN: curl offers http/1.1
* ALPN: server accepted http/1.1
* using HTTP/1.x
> GET /3/authentication?api_key=### HTTP/1.1
> Host: api.themoviedb.org
> User-Agent: curl/8.9.1
> Accept: */*
>
* Request completely sent off
< HTTP/1.1 200 OK
< Content-Type: text/html;charset=utf-8
< Content-Length: 0
< Connection: keep-alive
< Date: Sun, 15 Dec 2024 23:22:59 GMT
< Server: openresty
< Cache-Control: public, max-age=0
< Vary: accept-encoding
< X-Cache: Miss from cloudfront
< Via: 1.1 d9057c384f4ac5ba2672d2ff44de7e08.cloudfront.net (CloudFront)
< X-Amz-Cf-Pop: IAD89-C3
< Alt-Svc: h3=":443"; ma=86400
< X-Amz-Cf-Id: iQcfRiGGc57gKhASMeqNBOjwCJeWwZIJ_0DmF3G2kBp_DVkaDMVLwA==
< Vary: Origin
<
* Connection #0 to host api.themoviedb.org left intact

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

Jump to last post

Hi @skizzosjt,

We just didn't reply with a JSON object on the /authentication call. It was originally meant as a simple 200/401 response and nothing more.

I did however just deploy a tweak to it, so now it returns a JSON object.

Cheers.

@travisbell said:

Hi @skizzosjt,

We just didn't reply with a JSON object on the /authentication call. It was originally meant as a simple 200/401 response and nothing more.

I did however just deployed a tweak to it, so now it returns a JSON object.

Cheers.

Thanks. That was the one value I was using. (success) So my script is back to working. I appreciate the help!

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

عام

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

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

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

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

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

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

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

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

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

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

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

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

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

الاعدادات

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

تسجيل الدخول