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
Film of tv-serie niet gevonden? Meld je aan om deze toe te voegen.
Want to rate or add this item to a list?
Not a member?
Reactie van Travis Bell
op 16 december 2024 om 12:01 PM
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.
Reactie van skizzosjt
op 17 december 2024 om 7:52 PM
Thanks. That was the one value I was using. (success) So my script is back to working. I appreciate the help!