Page 1 of 1

AppEEARS API

Posted: Thu Oct 28, 2021 5:00 am America/New_York
by mchl.mccrthy
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

Re: AppEEARS API

Posted: Fri Oct 29, 2021 3:51 pm America/New_York
by LP DAAC - afriesz
@@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.

Re: AppEEARS API

Posted: Fri Oct 29, 2021 4:43 pm America/New_York
by mchl.mccrthy
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!

Re: AppEEARS API

Posted: Fri Jan 21, 2022 3:16 pm America/New_York
by gstonebridge
I had the same issue. Thanks for the tip. It's confusing because the Username field on the Earthdata login page accepts an email.