AppEEARS API

Please enter here to ask a question about any NASA Science related topics!
Post Reply
mchl.mccrthy
Posts: 2
Joined: Thu Oct 28, 2021 4:33 am America/New_York

AppEEARS API

by mchl.mccrthy » Thu Oct 28, 2021 5:00 am America/New_York

Hi all,

I'm currently struggling to use the AppEEARS API, following the 'Getting started with the AρρEEARS API' tutorial (in python) [1]. Querying available products and layers works fine, but when I try to get a request token, I get a 504 server error. I tried generating a request token on my Earthdata Login page [2], but when I use this token in a task request, I get the message: 'You don't have the permission to access the requested resource. It is either read-protected or not readable by the server.'

Any ideas what might be causing these issues and how to get around them?

Thanks a lot!

[1] https://lpdaac.usgs.gov/resources/e-lea ... a-request/
[2] https://urs.earthdata.nasa.gov/home > Generate Token

Tags:

LP DAAC - afriesz
Subject Matter Expert
Subject Matter Expert
Posts: 8
Joined: Tue Nov 12, 2019 4:02 pm America/New_York

Re: AppEEARS API

by LP DAAC - afriesz » Fri Oct 29, 2021 3:51 pm America/New_York

@@mchl.mccrthy ,

The token generated from the AppEEARS API to 'login' is separate from the tokens generated from the Earthdata Login. Here are a couple things to consider. First, if you ran your request on Wednesday, you may have bumped into the LP DAAC's planned maintenance window. If that's the case, please try again and see if it works. Second, if it's still not working please verify that you are using the proper endpoint, i.e., https://lpdaacsvc.cr.usgs.gov/appeears/api/login. For a quick verification try the following from the command line/terminal:

Code: Select all

curl -v --request POST --user <username>:<password> --header "Content-Length: 0" "https://lpdaacsvc.cr.usgs.gov/appeears/api/login"
where "<username>" and "<password>" is your Earthdata Login username and password respectively.

If your problem persists please reach out to LP DAAC User Services (https://lpdaac.usgs.gov/user_services/contact_us) and we can try to set up a call to troubleshoot.

mchl.mccrthy
Posts: 2
Joined: Thu Oct 28, 2021 4:33 am America/New_York

Re: AppEEARS API

by mchl.mccrthy » Fri Oct 29, 2021 4:43 pm America/New_York

Hi there, I realised while I was doing this verification that previously I was trying to log in via the API with my email as the username. (I use my email to log in to Earthdata normally.) With my actual username, everything works fine. Sorry for the silly question, and thanks a lot for your help!

Post Reply