r-spatial / rgee

Google Earth Engine for R
https://r-spatial.github.io/rgee/
Other
668 stars 146 forks source link

Cannot Authenticate: Invalid request #366

Open RCBlackburn opened 2 months ago

RCBlackburn commented 2 months ago

At submit an issue, please attached the following information of your rgee session:

library(rgee)

# Initialize the Earth Engine module.
ee_Initialize()

image

Attach your Python (reticulate) configuration:

library(reticulate)
py_config()

image

Description

I am having issues with the authentication step. Instead of generating a code, I get the invalid request displayed above.

What I Did

I have ran:

ee_Intialize(quiet = TRUE)
ee_Authenticate(quiet = TRUE)

ee_Intialize(quiet = FALSE)
ee_Authenticate(quiet = FALSE)

ee_Authenticate(auth_mode = "paste")
ee_Authenticate(auth_mode = "notebook")
ee_Authenticate(auth_mode = "gcloud")
ee_Authenticate(auth_mode = "appdefault")

Each time I run into the invalid request in some form or another.

Any tips for getting around the authentication step would be greatly appreciated!

Thanks.

fpirotti commented 3 weeks ago

Run this to authenticae reticulate::py_run_string("import ee; ee.Authenticate()") Run this to initialize... now GEE wants projects so you have to define a project - make sure you upgrade to latest GEE API (earthengine-api 0.1.416 ) - projects can be a number or ID (e.g. user/XXXX/projectname) reticulate::py_run_string("import ee; ee.Initialize(project='309736351492')")

hope it helps