-
Notifications
You must be signed in to change notification settings - Fork 314
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
App is blocked by Google #580
Comments
Your best bet is to follow the steps here to get your own API keys: https://github.com/insanum/gcalcli#login-information Though I have a problem with that where it keeps logging me out and making me re-authenticate every week or so. I may need to get it verified for it to stick. |
In the Cloud Console go to OAuth Consent Screen -> Edit App -> Click continue twice to get to "Test users" and you should be able to add your email. |
Steps, loosely following comment #497 (comment) 1. Google Developers Console https://console.developers.google.com
2. + Enable APIs and Services"
3. Credentials section in left menu
4. OAuth consent screen section in left menu
5. call gcalcli from command line
SO easy! :'D Update 1: Chromium or Firefox?With Update 2: --client_id or --client-id?The above steps worked well with
If this appears, change the call parameters accordingly in shell command and if applicable in Update 3: upgrade sixWhen running into error |
I tried what @aurisnoctis said. However, I couldn't be successful. Is there any other way around to make this work out? Also, I tried with chromium browser. |
I'm using Firefox and it gives me the option to continue with a warning: Look at Update 1 here. Using the |
Thanks @aurisnoctis Really helpful. |
I had been using this awesome app for about a month, and suddenly today, Google tells me that the app is blocked, and there's nothing I can do to get it authenticated. I had already set it up with my own GCP OAuth credentials, using .gcalclirc and it was working fine. Also, "Allow less secure apps" setting on my Google Account is "ON". I don't understand, I've been developing Google Cloud Platform apps for a few years and I was always given the option to "continue" and "allow" the app, now there is just no option, only a "Blocked" message. Any ideas? |
I solved this issue using the following resources:
|
Hello all, |
Same issue. I'm trying to read my schedule from my work account, where I can't change any of the above settings. |
I tried this guide for creating the client id and client secret and it worked flawlessly. I didn't even have to run "DisplayUnlockCaptcha" nor enable Less Secure Apps. |
I think the readme of this project should state a bit more clearly that you may have to do a 5+ step guide to authorize this app. Currently, it implies that only OAuth2 will be needed and anything else is optional. |
Just chiming in here that yes, the problem is still blocking simple usage of gcalcli, but on the other hand, the complicated process above does still work when applied with some flexibility. Google keeps changing the dashboards of the relevant API management, so it's hard to feel confident that you are doing the right thing. :) Thank you, @aurisnoctis |
Additional information… (At 11:26) I've been using gcalcli for about a week. I had authorized it to access one of my two Google accounts (my personal account) following the steps in the documentation. It was an awkward process, but I somewhat understand the complexities of working with Google's security. After using gcalcli for about a week, today I tried to use it to access the calendar belonging to my other Google account (my account in my employer's enterprise). In Google Calendar, long ago I gave each of my Google accounts mutual access to their calendars. I tried to use the gcalcli authorization for my personal account to add an event to my work account. At first, I got the following stack trace… Traceback (most recent call last):
File "/Users/lsloan/homebrew/bin/gcalcli", line 33, in <module>
sys.exit(load_entry_point('gcalcli==4.3.0', 'console_scripts', 'gcalcli')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/lsloan/homebrew/Cellar/gcalcli/4.3.0_3/libexec/lib/python3.11/site-packages/gcalcli/cli.py", line 181, in main
gcal.QuickAddEvent(
File "/Users/lsloan/homebrew/Cellar/gcalcli/4.3.0_3/libexec/lib/python3.11/site-packages/gcalcli/gcal.py", line 1294, in QuickAddEvent
new_event = self._retry_with_backoff(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/lsloan/homebrew/Cellar/gcalcli/4.3.0_3/libexec/lib/python3.11/site-packages/gcalcli/gcal.py", line 112, in _retry_with_backoff
return method.execute()
^^^^^^^^^^^^^^^^
File "/Users/lsloan/homebrew/Cellar/gcalcli/4.3.0_3/libexec/lib/python3.11/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
return wrapped(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/lsloan/homebrew/Cellar/gcalcli/4.3.0_3/libexec/lib/python3.11/site-packages/googleapiclient/http.py", line 923, in execute
resp, content = _retry_request(
^^^^^^^^^^^^^^^
File "/Users/lsloan/homebrew/Cellar/gcalcli/4.3.0_3/libexec/lib/python3.11/site-packages/googleapiclient/http.py", line 191, in _retry_request
resp, content = http.request(uri, method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/lsloan/homebrew/Cellar/gcalcli/4.3.0_3/libexec/lib/python3.11/site-packages/oauth2client/transport.py", line 186, in new_request
credentials._refresh(orig_request_method)
File "/Users/lsloan/homebrew/Cellar/gcalcli/4.3.0_3/libexec/lib/python3.11/site-packages/oauth2client/client.py", line 761, in _refresh
self._do_refresh_request(http)
File "/Users/lsloan/homebrew/Cellar/gcalcli/4.3.0_3/libexec/lib/python3.11/site-packages/oauth2client/client.py", line 819, in _do_refresh_request
raise HttpAccessTokenRefreshError(error_msg, status=resp.status)
oauth2client.client.HttpAccessTokenRefreshError: invalid_grant: Token has been expired or revoked. Thinking that it might be a temporary problem, I tried again. This time, gcalcli opened the following address in a web browser… https://accounts.google.com/o/oauth2/v2/auth?client_id=«REDACTED».apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2F&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcalendar&access_type=offline&response_type=code In the Google page that opened, I selected my account name when prompted. The next page showed me the familiar message others have mentioned… This app is blocked
This app tried to access sensitive info in your Google Account. To keep your account safe, Google blocked this access. I'm not certain whether this was caused by my token being expired/revoked as mentioned in the first error message or maybe it was triggered by trying to access my work account calendar from my personal account. Update 1(Added at 12:09) I went through all the auth. steps in README again. I created a completely new project in my personal account with new OAuth2 consent screen and client ID. gcalcli goes through the auth and shows me the output of the I wonder whether I need to add scopes to the Calendar API settings in my project. Update 2(Added at 14:10) I have it working again. I changed a couple of things. First, I added all the GCal scopes to the OAuth consent screen of my new project. That didn't make any difference. I can use the So I deleted the gcalcli support files ( Finally, I tried using my personal account to access the calendar of my work account, to which access has been granted. This time, it worked! 🎉 In conclusion, I'm not sure why access via the first project I set up stopped working. It seems that access between my two accounts doesn't have any effect on the auth. It does seem that gcalcli holds on to past auth data longer than it should. |
I've made some modifications in a fork using newer auth methods. Download a creds.json & put it in ~/.config/gcalcli/ - details in the update README. I'm not providing support, but you can see if it works for you (it works for me). Be warned this is a quick 30 minute hack, I suggest creating a virtualenv and installing it in there. Also it used my existing ~/.gcalcli_oauth file (not sure why currently) so I moved it to start a new auth flow. I suggest inspecting the diffs, no guarantees this won't wipe all your appointments! |
Alright, I'm removing the broken client ID from the app entirely in #707 while making the setup process a little friendlier. I'm pretty sure that takes care of all loose ends here, but please reach out with a fresh issue if you're still seeing problems not related to that broken client ID. |
I tried using
gcalcli list
for the first time and it opened a browser tab asking for verification. After choosing the account I got the following page:Not sure if this is intended or known. I tried this with my personal account and my University's account and I got the same result in both scenarios. I tried using the
--noauth_local_webserver
option and got the same result after logging in.Not sure how to solve it, and I couldn't find any similar issues online.
I am tried using both
gcalcli
andgcalcli-git
found on the AUR.The text was updated successfully, but these errors were encountered: