ChHarding / TouchTerrain_jupyter_docker

Image for running Touchterrain standalone via a jupyter notebook
15 stars 4 forks source link

Earth Engine auth error #3

Closed grant-vs closed 1 year ago

grant-vs commented 1 year ago

When using the TouchTerrain_jupyter_for_starters notebook, following the URL to authenticate Earth Engine and get the verification code results in a 400 error with this message:

Error 400: invalid_request The version of the app you're using doesn't include the latest security features to keep you protected. Please make sure to download from a trusted source and update to the latest, most secure version.

Is there anything I can do to solve this issue?

ChHarding commented 1 year ago

Hi!

I know you solved this (closed the issue) but just for my curiosity what was the reason for this? What (local) browser did try use?

On Aug 8, 2022, at 18:52, grant-vs @.**@.>> wrote:

When using the TouchTerrain_jupyter_for_starters notebook, following the URL to authenticate Earth Engine and get the verification code results in a 400 error with this message:

Error 400: invalid_request The version of the app you're using doesn't include the latest security features to keep you protected. Please make sure to download from a trusted source and update to the latest, most secure version.

Is there anything I can do to solve this issue?

— Reply to this email directly, view it on GitHubhttps://github.com/ChHarding/TouchTerrain_jupyter_docker/issues/3, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEYDF5PVROHWOAEQGTZ37W3VYGMSBANCNFSM5563M4AQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Chris Harding Associate Professor Department of Geological & Atmospheric Sciences Touchterrain.geol.iastate.eduhttp://Touchterrain.geol.iastate.edu

grant-vs commented 1 year ago

Hi Chris. I should've explained how I resolved it, sorry about that.

I think it was just a mental blank on my part. I tried on multiple browsers and faced the same error, so I went through the standard notebook, not the starter one, and that has a bit more info in there about ee. In that notebook it explains signing up for ee, which I did. Now running both the standard and starter notebook work fine.

So no issue with the program, just needed to setup the account before running. Must've been a long day, should've worked that out before opening an issue!

Cheers, Grant

ChHarding commented 1 year ago

Grant,

This is actually not your fault! The requirement to sign up for a ee account is actually very new. A couple of years back, this was required and this is what it’s mentioned in the older notebook. But it then used to be that one would only have to have a google account, which is reflected in the starter notebook, which I wrote more recently. So this has to be updated. As you’ve just done this, can I ask how it went so I can describe it better in my starter notebook?

Cheers

Chris

On Aug 14, 2022, at 00:49, grant-vs @.**@.>> wrote:

Hi Chris. I should've explained how I resolved it, sorry about that.

I think it was just a mental blank on my part. I tried on multiple browsers and faced the same error, so I went through the standard notebook, not the starter one, and that has a bit more info in there about ee. In that notebook it explains signing up for ee, which I did. Now running both the standard and starter notebook work fine.

So no issue with the program, just needed to setup the account before running. Must've been a long day, should've worked that out before opening an issue!

Cheers, Grant

— Reply to this email directly, view it on GitHubhttps://github.com/ChHarding/TouchTerrain_jupyter_docker/issues/3#issuecomment-1214290601, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEYDF5LD6ZNWMWOHKSIMX6TVZCCHPANCNFSM5563M4AQ. You are receiving this because you commented.Message ID: @.***>

Chris Harding Associate Professor Department of Geological & Atmospheric Sciences Touchterrain.geol.iastate.eduhttp://Touchterrain.geol.iastate.edu

grant-vs commented 1 year ago

Yeah no worries.

I went to https://signup.earthengine.google.com/ and it presented a sign up form. The form requested this info as required:

It said that not all applications are accepted and that the acceptance email could take up to one week, but I received an email immediately. I own a company which I used to register. But for the sake of testing this process, I signed up with my personal google account also. I put 'Personal' as the organization, and 'No Affiliation' for the institution type. This account was also approved immediately.

Once I had created the account, I manually set up a project in the Earth Engine dashboard to use for my touch terrain project. This doesn't need to be done through ee though. I tested using the link in your notebook (code.earthengine.google.com) and it's easy to get the token that way. Just need to be signed in to the correct google account before using that link. I tested on Edge, Chrome, and Firefox and they all worked for me.

Hope that's enough info for you.

Cheers, Grant

ChHarding commented 1 year ago

Grant,

Would you be willing to test something for me? I’ve managed to make the Jupiter notebook to run in a binder, which mostly works (building/installing take about 10 mins and sometimes hangs for no reason). I’ve heavily edited the notebook for it and would like another set up eyes to check if I left out something vital.

There’s a badge at the very bottom of the ReaMe (which it will move to the top once it all works) but the URL for the binder is:

https://mybinder.org/v2/gh/ChHarding/TouchTerrain_for_CAGEO/HEAD?labpath=TouchTerrain_jupyter_starters_binder.ipynb

This notebook also references a guide for Earth Engine authentication with screenshots that is hopefully simple to use.

Cheers

Chris

On Aug 15, 2022, at 05:09, grant-vs @.**@.>> wrote:

Yeah no worries.

I went to https://signup.earthengine.google.com/ and it presented a sign up form. The form requested this info as required:

It said that not all applications are accepted and that the acceptance email could take up to one week, but I received an email immediately. I own a company which I used to register. But for the sake of testing this process, I signed up with my personal google account also. I put 'Personal' as the organization, and 'No Affiliation' for the institution type. This account was also approved immediately.

Once I had created the account, I manually set up a project in the Earth Engine dashboard to use for my touch terrain project. This doesn't need to be done through ee though. I tested using the link in your notebook (code.earthengine.google.comhttp://code.earthengine.google.com) and it's easy to get the token that way. Just need to be signed in to the correct google account before using that link. I tested on Edge, Chrome, and Firefox and they all worked for me.

Hope that's enough info for you.

Cheers, Grant

— Reply to this email directly, view it on GitHubhttps://github.com/ChHarding/TouchTerrain_jupyter_docker/issues/3#issuecomment-1214849580, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEYDF5NBHHUAULOZ6UWMGGTVZIJNLANCNFSM5563M4AQ. You are receiving this because you commented.Message ID: @.***>

Chris Harding Associate Professor Department of Geological & Atmospheric Sciences Touchterrain.geol.iastate.eduhttp://Touchterrain.geol.iastate.edu

Bg983HjPD992 commented 1 year ago

Acknowledging that this issue is closed, I'm still having an issue with the Authorization Error (Error 400: invalid_request) when attempting to run ee.Authenticate(). The cell runs and generates a URL, but when clicking it I receive the above error. I have requested and received an Earth Engine account with google, and have opened a test project and set up a charge account. Hoping there is something simple that I missed along the way!

I tried to authenticate using the for_starters, _binder, _colab and _standalone versions from the notebook.

ChHarding commented 1 year ago

Hi!

Back up a bit. So you are running a jupyter notebook in what environment? Locally or on colab? I would recommend running the -colab version as that’s the one I’ve worked on most recently and colab is just way faster to get active than binder (which I personally don’y use anymore.) And I do admit that I have to update the section in the ReadMe that talks about how to get standalone running!

Also I need to know more about what goes wrong. I assume you are following this: https://github.com/ChHarding/TouchTerrain_for_CAGEO/blob/master/EarthEngine_authentication_guide.md ? Are you able to go through all the cloud project setup steps and finally generate an authorization code (token)?

Cheers

Chris

On Nov 15, 2022, at 23:44, Bg983HjPD992 @.**@.>> wrote:

Acknowledging that this issue is closed, I'm still having an issue with the Authorization Error (Error 400: invalid_request) when attempting to run ee.Authenticate(). The cell runs and generates a URL, but when clicking it I receive the above error. I have requested and received an Earth Engine account with google, and have opened a test project and set up a charge account. Hoping there is something simple that I missed along the way!

I tried to authenticate using the for_starters, _binder, _colab and _standalone versions from the notebook.

— Reply to this email directly, view it on GitHubhttps://github.com/ChHarding/TouchTerrain_jupyter_docker/issues/3#issuecomment-1316396463, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEYDF5LHBFGDK6MHGB2KJ7TWIRYE3ANCNFSM5563M4AQ. You are receiving this because you commented.Message ID: @.***>

Chris Harding Associate Professor Department of Geological & Atmospheric Sciences Touchterrain.geol.iastate.eduhttp://Touchterrain.geol.iastate.edu

Bg983HjPD992 commented 1 year ago

Hi, professor. Per your recommendation I went into the colab notebook (I neglected to open it in colab previously, and was running it locally – obviously that didn’t work). I was able to get an authentication code, but received a “KeyError: 'client_id'” error when I did so. Full text of output:

To authorize access needed by Earth Engine, open the following URL in a web browser and follow the instructions. If the web browser does not start automatically, please manually browse the URL below.

https://code.earthengine.google.com/client-auth?scopes=https%3A//www.googleapis.com/auth/earthengine%20https%3A//www.googleapis.com/auth/devstorage.full_control&request_id=uMR_vwKWerAxuStFr8KS1YG1UoibJ83pRaIfSgk_h3I&tc=K2uC3e6WDFbLedfAZMfftIytRWtmxrmax2b_s5b8hO8&cc=HexTfp5xNU1EbHk4aj55GCUr4HmV4bHvDH-Rw-qdmpo

The authorization workflow will generate a code, which you should paste in the box below. Enter verification code: 4/1AfgeXvtrTN0rk6895jwGrJmyswWazDsqQrLDCYW5dYQHaYAtd7ItzV846n4

RefreshError Traceback (most recent call last)

in 4 try: ----> 5 ee.Initialize() 6 except Exception as e: # if the initialization didn't work, web authenticate first 21 frames /usr/local/lib/python3.7/dist-packages/ee/__init__.py in Initialize(credentials, opt_url, cloud_api_key, http_transport, project) 138 project=project, --> 139 http_transport=http_transport) 140 # Initialize the dynamically loaded functions on the objects that want them. /usr/local/lib/python3.7/dist-packages/ee/data.py in initialize(credentials, api_base_url, tile_base_url, cloud_api_base_url, cloud_api_key, project, http_transport) 200 --> 201 _install_cloud_api_resource() 202 /usr/local/lib/python3.7/dist-packages/ee/data.py in _install_cloud_api_resource() 266 response_inspector=_handle_profiling_response, --> 267 http_transport=_http_transport) 268 /usr/local/lib/python3.7/dist-packages/ee/_cloud_api_utils.py in build_cloud_resource(api_base_url, api_key, credentials, timeout, headers_supplier, response_inspector, http_transport, raw) 182 if resource is None: --> 183 resource = build() 184 resource._baseUrl = api_base_url /usr/local/lib/python3.7/dist-packages/ee/_cloud_api_utils.py in build(**kwargs) 171 cache_discovery=False, --> 172 **kwargs) # pytype: disable=wrong-keyword-args 173 /usr/local/lib/python3.7/dist-packages/googleapiclient/_helpers.py in positional_wrapper(*args, **kwargs) 133 logger.warning(message) --> 134 return wrapped(*args, **kwargs) 135 /usr/local/lib/python3.7/dist-packages/googleapiclient/discovery.py in build(serviceName, version, http, discoveryServiceUrl, developerKey, model, requestBuilder, credentials, cache_discovery, cache, client_options, adc_cert_path, adc_key_path, num_retries) 275 developerKey, --> 276 num_retries=num_retries, 277 ) /usr/local/lib/python3.7/dist-packages/googleapiclient/discovery.py in _retrieve_discovery_doc(url, http, cache_discovery, cache, developerKey, num_retries) 375 req = HttpRequest(http, HttpRequest.null_postproc, actual_url) --> 376 resp, content = req.execute(num_retries=num_retries) 377 /usr/local/lib/python3.7/dist-packages/googleapiclient/_helpers.py in positional_wrapper(*args, **kwargs) 133 logger.warning(message) --> 134 return wrapped(*args, **kwargs) 135 /usr/local/lib/python3.7/dist-packages/googleapiclient/http.py in execute(self, http, num_retries) 908 body=self.body, --> 909 headers=self.headers, 910 ) /usr/local/lib/python3.7/dist-packages/googleapiclient/http.py in _retry_request(http, num_retries, req_type, sleep, rand, uri, method, *args, **kwargs) 176 exception = None --> 177 resp, content = http.request(uri, method, *args, **kwargs) 178 # Retry on SSL errors and socket timeout errors. /usr/local/lib/python3.7/dist-packages/google_auth_httplib2.py in request(self, uri, method, body, headers, **kwargs) 189 self.credentials.before_request( --> 190 self._request, method, uri, request_headers) 191 /usr/local/lib/python3.7/dist-packages/google/auth/credentials.py in before_request(self, request, method, url, headers) 133 if not self.valid: --> 134 self.refresh(request) 135 self.apply(headers) /usr/local/lib/python3.7/dist-packages/google/oauth2/credentials.py in refresh(self, request) 326 rapt_token=self._rapt_token, --> 327 enable_reauth_refresh=self._enable_reauth_refresh, 328 ) /usr/local/lib/python3.7/dist-packages/google/oauth2/reauth.py in refresh_grant(request, token_uri, refresh_token, client_id, client_secret, scopes, rapt_token, enable_reauth_refresh) 348 if not response_status_ok: --> 349 _client._handle_error_response(response_data, retryable_error) 350 return _client._handle_refresh_grant_response(response_data, refresh_token) + ( /usr/local/lib/python3.7/dist-packages/google/oauth2/_client.py in _handle_error_response(response_data, retryable_error) 69 raise exceptions.RefreshError( ---> 70 error_details, response_data, retryable=retryable_error 71 ) RefreshError: ('invalid_scope: Bad Request', {'error': 'invalid_scope', 'error_description': 'Bad Request'}) During handling of the above exception, another exception occurred: KeyError Traceback (most recent call last) in 5 ee.Initialize() 6 except Exception as e: # if the initialization didn't work, web authenticate first ----> 7 ee.Authenticate() 8 ee.Initialize() /usr/local/lib/python3.7/dist-packages/ee/__init__.py in Authenticate(authorization_code, quiet, code_verifier, auth_mode, scopes) 103 """ 104 return oauth.authenticate(authorization_code, quiet, code_verifier, auth_mode, --> 105 scopes) 106 107 /usr/local/lib/python3.7/dist-packages/ee/oauth.py in authenticate(cli_authorization_code, quiet, cli_code_verifier, auth_mode, scopes) 398 _open_new_browser(flow.auth_url) 399 --> 400 flow.save_code() 401 402 /usr/local/lib/python3.7/dist-packages/ee/oauth.py in save_code(self, code) 441 redirect_uri = self.server.url 442 code = self.server.fetch_code() # Waits for oauth callback --> 443 _obtain_and_write_token(code, self.code_verifier, self.scopes, redirect_uri) 444 445 def display_instructions(self, quiet=None): /usr/local/lib/python3.7/dist-packages/ee/oauth.py in _obtain_and_write_token(auth_code, code_verifier, scopes, redirect_uri) 187 fetch_client = request.Request(FETCH_URL, data=data, headers=headers) 188 fetched_info = json.loads(request.urlopen(fetch_client).read().decode()) --> 189 client_info = {k: fetched_info[k] for k in ['client_id', 'client_secret']} 190 scopes = fetched_info.get('scopes') or scopes 191 token = request_token(auth_code.strip(), code_verifier, **client_info) /usr/local/lib/python3.7/dist-packages/ee/oauth.py in (.0) 187 fetch_client = request.Request(FETCH_URL, data=data, headers=headers) 188 fetched_info = json.loads(request.urlopen(fetch_client).read().decode()) --> 189 client_info = {k: fetched_info[k] for k in ['client_id', 'client_secret']} 190 scopes = fetched_info.get('scopes') or scopes 191 token = request_token(auth_code.strip(), code_verifier, **client_info) KeyError: 'client_id' Thoughts? Seamas Sent from Mail for Windows From: ***@***.***> Sent: Thursday, November 17, 2022 10:15 PM To: ***@***.***> Cc: ***@***.***>; ***@***.***> Subject: Re: [ChHarding/TouchTerrain_jupyter_docker] Earth Engine auth error (Issue #3) Hi! Back up a bit. So you are running a jupyter notebook in what environment? Locally or on colab? I would recommend running the -colab version as that’s the one I’ve worked on most recently and colab is just way faster to get active than binder (which I personally don’y use anymore.) And I do admit that I have to update the section in the ReadMe that talks about how to get standalone running! Also I need to know more about what goes wrong. I assume you are following this: https://github.com/ChHarding/TouchTerrain_for_CAGEO/blob/master/EarthEngine_authentication_guide.md ? Are you able to go through all the cloud project setup steps and finally generate an authorization code (token)? Cheers Chris On Nov 15, 2022, at 23:44, Bg983HjPD992 ***@***.******@***.***>> wrote: Acknowledging that this issue is closed, I'm still having an issue with the Authorization Error (Error 400: invalid_request) when attempting to run ee.Authenticate(). The cell runs and generates a URL, but when clicking it I receive the above error. I have requested and received an Earth Engine account with google, and have opened a test project and set up a charge account. Hoping there is something simple that I missed along the way! I tried to authenticate using the for_starters, _binder, _colab and _standalone versions from the notebook. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: ***@***.***> Chris Harding Associate Professor Department of Geological & Atmospheric Sciences Touchterrain.geol.iastate.edu — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: ***@***.***>
ChHarding commented 1 year ago

Well, that’s not something that ever happened to me, sorry! My only guess would be that there’s a mismatch of google accounts, i.e. maybe the user that’s running the colab notebook is different from the user that you have when you get your authentication code(???) Is there a chance that this is happening?

On Nov 19, 2022, at 01:26, Bg983HjPD992 @.**@.>> wrote:

Hi, professor. Per your recommendation I went into the colab notebook (I neglected to open it in colab previously, and was running it locally – obviously that didn’t work). I was able to get an authentication code, but received a “KeyError: 'client_id'” error when I did so. Full text of output:

To authorize access needed by Earth Engine, open the following URL in a web browser and follow the instructions. If the web browser does not start automatically, please manually browse the URL below.

https://code.earthengine.google.com/client-auth?scopes=https%3A//www.googleapis.com/auth/earthengine%20https%3A//www.googleapis.com/auth/devstorage.full_control&request_id=uMR_vwKWerAxuStFr8KS1YG1UoibJ83pRaIfSgk_h3I&tc=K2uC3e6WDFbLedfAZMfftIytRWtmxrmax2b_s5b8hO8&cc=HexTfp5xNU1EbHk4aj55GCUr4HmV4bHvDH-Rw-qdmpo

The authorization workflow will generate a code, which you should paste in the box below. Enter verification code: 4/1AfgeXvtrTN0rk6895jwGrJmyswWazDsqQrLDCYW5dYQHaYAtd7ItzV846n4

RefreshError Traceback (most recent call last)

in 4 try: ----> 5 ee.Initialize() 6 except Exception as e: # if the initialization didn't work, web authenticate first 21 frames /usr/local/lib/python3.7/dist-packages/ee/__init__.py in Initialize(credentials, opt_url, cloud_api_key, http_transport, project) 138 project=project, --> 139 http_transport=http_transport) 140 # Initialize the dynamically loaded functions on the objects that want them. /usr/local/lib/python3.7/dist-packages/ee/data.py in initialize(credentials, api_base_url, tile_base_url, cloud_api_base_url, cloud_api_key, project, http_transport) 200 --> 201 _install_cloud_api_resource() 202 /usr/local/lib/python3.7/dist-packages/ee/data.py in _install_cloud_api_resource() 266 response_inspector=_handle_profiling_response, --> 267 http_transport=_http_transport) 268 /usr/local/lib/python3.7/dist-packages/ee/_cloud_api_utils.py in build_cloud_resource(api_base_url, api_key, credentials, timeout, headers_supplier, response_inspector, http_transport, raw) 182 if resource is None: --> 183 resource = build() 184 resource._baseUrl = api_base_url /usr/local/lib/python3.7/dist-packages/ee/_cloud_api_utils.py in build(**kwargs) 171 cache_discovery=False, --> 172 **kwargs) # pytype: disable=wrong-keyword-args 173 /usr/local/lib/python3.7/dist-packages/googleapiclient/_helpers.py in positional_wrapper(*args, **kwargs) 133 logger.warning(message) --> 134 return wrapped(*args, **kwargs) 135 /usr/local/lib/python3.7/dist-packages/googleapiclient/discovery.py in build(serviceName, version, http, discoveryServiceUrl, developerKey, model, requestBuilder, credentials, cache_discovery, cache, client_options, adc_cert_path, adc_key_path, num_retries) 275 developerKey, --> 276 num_retries=num_retries, 277 ) /usr/local/lib/python3.7/dist-packages/googleapiclient/discovery.py in _retrieve_discovery_doc(url, http, cache_discovery, cache, developerKey, num_retries) 375 req = HttpRequest(http, HttpRequest.null_postproc, actual_url) --> 376 resp, content = req.execute(num_retries=num_retries) 377 /usr/local/lib/python3.7/dist-packages/googleapiclient/_helpers.py in positional_wrapper(*args, **kwargs) 133 logger.warning(message) --> 134 return wrapped(*args, **kwargs) 135 /usr/local/lib/python3.7/dist-packages/googleapiclient/http.py in execute(self, http, num_retries) 908 body=self.body, --> 909 headers=self.headers, 910 ) /usr/local/lib/python3.7/dist-packages/googleapiclient/http.py in _retry_request(http, num_retries, req_type, sleep, rand, uri, method, *args, **kwargs) 176 exception = None --> 177 resp, content = http.request(uri, method, *args, **kwargs) 178 # Retry on SSL errors and socket timeout errors. /usr/local/lib/python3.7/dist-packages/google_auth_httplib2.py in request(self, uri, method, body, headers, **kwargs) 189 self.credentials.before_request( --> 190 self._request, method, uri, request_headers) 191 /usr/local/lib/python3.7/dist-packages/google/auth/credentials.py in before_request(self, request, method, url, headers) 133 if not self.valid: --> 134 self.refresh(request) 135 self.apply(headers) /usr/local/lib/python3.7/dist-packages/google/oauth2/credentials.py in refresh(self, request) 326 rapt_token=self._rapt_token, --> 327 enable_reauth_refresh=self._enable_reauth_refresh, 328 ) /usr/local/lib/python3.7/dist-packages/google/oauth2/reauth.py in refresh_grant(request, token_uri, refresh_token, client_id, client_secret, scopes, rapt_token, enable_reauth_refresh) 348 if not response_status_ok: --> 349 _client._handle_error_response(response_data, retryable_error) 350 return _client._handle_refresh_grant_response(response_data, refresh_token) + ( /usr/local/lib/python3.7/dist-packages/google/oauth2/_client.py in _handle_error_response(response_data, retryable_error) 69 raise exceptions.RefreshError( ---> 70 error_details, response_data, retryable=retryable_error 71 ) RefreshError: ('invalid_scope: Bad Request', {'error': 'invalid_scope', 'error_description': 'Bad Request'}) During handling of the above exception, another exception occurred: KeyError Traceback (most recent call last) in 5 ee.Initialize() 6 except Exception as e: # if the initialization didn't work, web authenticate first ----> 7 ee.Authenticate() 8 ee.Initialize() /usr/local/lib/python3.7/dist-packages/ee/__init__.py in Authenticate(authorization_code, quiet, code_verifier, auth_mode, scopes) 103 """ 104 return oauth.authenticate(authorization_code, quiet, code_verifier, auth_mode, --> 105 scopes) 106 107 /usr/local/lib/python3.7/dist-packages/ee/oauth.py in authenticate(cli_authorization_code, quiet, cli_code_verifier, auth_mode, scopes) 398 _open_new_browser(flow.auth_url) 399 --> 400 flow.save_code() 401 402 /usr/local/lib/python3.7/dist-packages/ee/oauth.py in save_code(self, code) 441 redirect_uri = self.server.url 442 code = self.server.fetch_code() # Waits for oauth callback --> 443 _obtain_and_write_token(code, self.code_verifier, self.scopes, redirect_uri) 444 445 def display_instructions(self, quiet=None): /usr/local/lib/python3.7/dist-packages/ee/oauth.py in _obtain_and_write_token(auth_code, code_verifier, scopes, redirect_uri) 187 fetch_client = request.Request(FETCH_URL, data=data, headers=headers) 188 fetched_info = json.loads(request.urlopen(fetch_client).read().decode()) --> 189 client_info = {k: fetched_info[k] for k in ['client_id', 'client_secret']} 190 scopes = fetched_info.get('scopes') or scopes 191 token = request_token(auth_code.strip(), code_verifier, **client_info) /usr/local/lib/python3.7/dist-packages/ee/oauth.py in (.0) 187 fetch_client = request.Request(FETCH_URL, data=data, headers=headers) 188 fetched_info = json.loads(request.urlopen(fetch_client).read().decode()) --> 189 client_info = {k: fetched_info[k] for k in ['client_id', 'client_secret']} 190 scopes = fetched_info.get('scopes') or scopes 191 token = request_token(auth_code.strip(), code_verifier, **client_info) KeyError: 'client_id' Thoughts? Seamas Sent from Mail for Windows From: ***@***.***> Sent: Thursday, November 17, 2022 10:15 PM To: ***@***.***> Cc: ***@***.***>; ***@***.***> Subject: Re: [ChHarding/TouchTerrain_jupyter_docker] Earth Engine auth error (Issue #3) Hi! Back up a bit. So you are running a jupyter notebook in what environment? Locally or on colab? I would recommend running the -colab version as that’s the one I’ve worked on most recently and colab is just way faster to get active than binder (which I personally don’y use anymore.) And I do admit that I have to update the section in the ReadMe that talks about how to get standalone running! Also I need to know more about what goes wrong. I assume you are following this: https://github.com/ChHarding/TouchTerrain_for_CAGEO/blob/master/EarthEngine_authentication_guide.md ? Are you able to go through all the cloud project setup steps and finally generate an authorization code (token)? Cheers Chris On Nov 15, 2022, at 23:44, Bg983HjPD992 ***@***.******@***.***>> wrote: Acknowledging that this issue is closed, I'm still having an issue with the Authorization Error (Error 400: invalid_request) when attempting to run ee.Authenticate(). The cell runs and generates a URL, but when clicking it I receive the above error. I have requested and received an Earth Engine account with google, and have opened a test project and set up a charge account. Hoping there is something simple that I missed along the way! I tried to authenticate using the for_starters, _binder, _colab and _standalone versions from the notebook. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: ***@***.***> Chris Harding Associate Professor Department of Geological & Atmospheric Sciences Touchterrain.geol.iastate.edu — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: ***@***.***> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: ***@***.***> Chris Harding Associate Professor Department of Geological & Atmospheric Sciences Touchterrain.geol.iastate.edu