The Movie Database-ondersteuning

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 antwoorden (op pagina 1 van 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!

Film of tv-serie niet gevonden? Meld je aan om deze toe te voegen.

Wereldwijd

s focus op zoekbalk
p open profielmenu
esc sluit een open venster
? open sneltoetsen venster

Op media pagina's

b ga terug (of ga naar bovenliggend item)
e ga naar beweken

Op tv-seizoenspagina's

(rechter pijl) ga naar volgende seizoen
(linker pijl) ga naar vorig seizoen

Op pagina's met tv-series

(rechter pijl) ga naar volgende aflevering
(linker pijl) ga naar vorige aflevering

Op alle afbeeldingspagina's

a open venster afbeelding toevoegen

Op alle bewerkte pagina's

t open vertaalmenu
ctrl+ s verstuur formulier

Op discussiepagina's

n start nieuwe discussie
w Verander kijk status
p privé of openbaar
c schakelen sluiten/openen
a open activiteit
r beantwoord discussie
l ga naar laatste antwoord
ctrl+ enter verstuur uw bericht
(rechter pijl) volgende pagina
(linker pijl) vorige pagina

Instellingen

Want to rate or add this item to a list?

Inloggen