Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Earth API Returning 403 (due to query parameters being dropped) #174

Open
mosheduminer opened this issue Sep 18, 2022 · 1 comment
Open

Comments

@mosheduminer
Copy link

Curl shows the following:

> curl -vvv https://api.nasa.gov/planetary/earth/imagery?lon=-95.33&lat=29.78&date=2018-01-01&dim=0.15&api_key=DEMO_KEY
*   Trying 3.32.45.174:443...
* Connected to api.nasa.gov (3.32.45.174) port 443 (#0)
* schannel: disabled automatic use of client certificate
* ALPN: offers http/1.1
* ALPN: server accepted http/1.1
> GET /planetary/earth/imagery?lon=-95.33 HTTP/1.1
> Host: api.nasa.gov
> User-Agent: curl/7.83.1
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 403 Forbidden
< Date: Sun, 18 Sep 2022 13:11:00 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Connection: keep-alive
< Vary: Accept-Encoding
< Access-Control-Allow-Origin: *
< Strict-Transport-Security: max-age=31536000; preload
< Vary: Accept-Encoding
< X-Cache: MISS
< X-Content-Type-Options: nosniff
< X-Vcap-Request-Id: d9ceac37-96aa-4406-4396-26ea7faf305c
< X-Xss-Protection: 1; mode=block
< X-Frame-Options: DENY
<
{
  "error": {
    "code": "API_KEY_MISSING",
    "message": "No api_key was supplied. Get one at https://api.nasa.gov:443"
  }
}* Connection #0 to host api.nasa.gov left intact
'lat' is not recognized as an internal or external command,
operable program or batch file.
The system cannot accept the date entered.
Enter the new date: (mm-dd-yy)

Note this line: > GET /planetary/earth/imagery?lon=-95.33 HTTP/1.1 - apparently all query params after the first are dropped. Putting the API key first results in the command hanging (because lon and lat get omitted). I also get the same behavior trying to use my personal API key. I suppose a misconfigured proxy is to blame, as the code for this endpoint looks fine.

I noticed this issue: nasa/earth-imagery-api#1. Based on my observations above, I don't agree with the conclusion there that NASA shut down the API (after all, I am getting a (bad) response from the server).

Of course, if this is not the right place to file an issue, you can transfer it, or I can open an issue in the appropriate repo.

@mosheduminer
Copy link
Author

I also noticed this issue just now, but I'm not sure that it's the same as this one: #164.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant