The Movie Database 支持

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 发送信息
(右箭头)下一页
(左箭头)前一页

设置

想给这个条目评分或将其添加到片单中?

登录

还不是会员?

注册加入社区