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

Credential error for Landsat product when using rsat_search() #7

Closed
michaeldgarber opened this issue Dec 14, 2021 · 3 comments
Closed

Comments

@michaeldgarber
Copy link

michaeldgarber commented Dec 14, 2021

Hello, I am receiving the following error telling me to check my credentials. I've confirmed the username and password are correct at the USGS site and have even created a new user profile. (My other username is an email address, which I thought may have been causing the issue.) Here's the code I've run, copied mostly verbatim from the first vignette, except I've substituted LANDSAT_8_C1 for the product:

set_credentials("username", "pw", "scihub")
set_credentials("username", "pw", "earthdata")
set_credentials("username", "pw", "usgs")

data("ex.navarre")
toi <- as.Date("2021-01-01") + 0:15
rcd <- rsat_search(region = ex.navarre,
                   product = c("LANDSAT_8_C1"),
                   dates = toi)

For what it's worth, I received a similar error when trying to access Landsat data using the getSpatialData package, but with that package, I did not have a credentials error for either Earth Data or SciHub. So maybe it's an issue specifically with USGS?

Thank you. I hope to make good use of this package soon once I can figure out the credentials issue.

No entry found for product .
Warning messages:
1: In .local(region, product, ...) :
Error in Earth Explorer api connection. HTTP 404.
2: In .local(region, product, ...) :
Error in Earth Explorer api connection. HTTP 404.
3: In .local(region, product, ...) :
Error in Earth Explorer api connection. HTTP 404.
4: In .local(region, product, ...) :
Error in Earth Explorer api connection. HTTP 404.
5: In .local(region, product, ...) :
Error in Earth Explorer api connection. HTTP 404.
6: In .local(region, product, ...) :
Error in Earth Explorer api connection. HTTP 404.
7: In .local(region, product, ...) :
Cannot perform Landsat search, check your credentials and/or the api status: https://m2m.cr.usgs.gov/api/docs/json/

@Aviankind
Copy link

Hi, answered you here and hope it helps?

@anniedeer
Copy link

Hi,
I am also having trouble downloading data from Landsat 8. I followed Aviankind's instructions to request USGS API machine access; however, I am still receiving an error similar to the one above even after being granted access. I've double checked my username and password. Thanks for the help!

set_credentials(username, password, "usgs")

LandsatDATA <- rsat_search(region = AOI_r,
                               product = "LANDSAT_8_C1",
                               dates = as.Date("2019-03-01") + seq(1, 30, 1))

Searching scenes in the LANDSAT_8_C1 product...
No entry found for product .
Warning messages:
1: In .local(region, product, ...) : DATASET_AUTH
2: In .local(region, product, ...) : DATASET_AUTH
3: In .local(region, product, ...) : DATASET_AUTH
4: In .local(region, product, ...) : DATASET_AUTH
5: In .local(region, product, ...) : DATASET_AUTH
6: In .local(region, product, ...) : DATASET_AUTH
7: In .local(region, product, ...) :
Cannot perform Landsat search, check your credentials and/or the api status: https://m2m.cr.usgs.gov/api/docs/json/

@olliewearn
Copy link

Hi, I also get the same "check you credentials" error when trying to access Landsat 8 data. I tried different options for the product argument, including "LANDSAT_8_C1" and "landsat_8_c1" (the latter is what rsat_products() suggests).

Sentinel-2 and MODIS work fine, however.

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

5 participants