error: Access token is missing or refresh token is expired.
when I run this command I get the error above:
calcurse-caldav --init keep-local
this opens up a window on my browser that displays
Error 400: uri_redirect_mismatch
here is my config file:
10 [General] 12 Binary = calcurse 16 Hostname = apidata.googleusercontent.com 20 Path = /caldav/v2/<redacted>/events/ 22 # Type of authentication to use. Must be "basic" or "oauth2" 23 AuthMethod = OAuth2 25 # Enable this if you want to skip SSL certificate checks. 26 InsecureSSL = Yes 30 HTTPS = Yes 40 SyncFilter = cal 46 DryRun = No 49 Verbose = Yes 63 [OAuth2] 64 ClientID = <redacted> ClientSecret = <redacted> 66 Scope = https://www.googleapis.com/auth/calendar 70 RedirectURI = https:/127.0.0.1
if you need any additional information, let me know. Thanks!
Thanks for reporting! Which version of calcurse are you using? Can you please confirm that your goal is to synchronize with Google Calendar? Did you make sure you're carefully following all steps in the Synchronization With Google Calendar section at [1]?
[1] https://calcurse.org/files/calcurse-caldav.html
Yes, My goal was to synchronize with google calendar. The version is calcurse 4.7.1-1, I used the pacman repository. I was sure to follow all the instructions in that section. I realize the lines were removed, so here's a re-uploaded version of my config file for clarity:
10 [General]
12 Binary = calcurse
16 Hostname = apidata.googleusercontent.com
20 Path = /caldav/v2/
I noticed your RedirectURI is https:/127.0.0.1, should it be http://127.0.0.1 instead?
so I fixed that, but now when I run
calcurse-caldav --init keep-local --authcode
Are you using the most recent release of calcurse? This error has previously been reported in GitHub issue #87. Also see issue #147.
if the current pacman repository version is the current version, I'm on the current version. something weird happened when I retried my previous command:
calcurse-caldav --init keep-local --authcode Connecting to apidata.googleusercontent.com... Traceback (most recent call last): File "/usr/bin/calcurse-caldav", line 270, in run_auth credentials.refresh(httplib2.Http()) File "/usr/lib/python3.10/site-packages/oauth2client/client.py", line 545, in refresh self._refresh(http) File "/usr/lib/python3.10/site-packages/oauth2client/client.py", line 761, in _refresh self._do_refresh_request(http) File "/usr/lib/python3.10/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.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/calcurse-caldav", line 742, in
Looks like your token expired; see https://stackoverflow.com/questions/66058279/token-has-been-expired-or-revoked-google-oauth2-refresh-token-gets-expired-i for details.
thank you for your help, I created new credentials and it worked.
On Sat, Apr 16, 2022 at 2:53 PM Lukas Fleischer @.***> wrote:
Looks like your token expired; see https://stackoverflow.com/questions/66058279/token-has-been-expired-or-revoked-google-oauth2-refresh-token-gets-expired-i for details.
— Reply to this email directly, view it on GitHub https://github.com/lfos/calcurse/issues/418#issuecomment-1100760604, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASZJSIVCDSGMAMRVF3JWMX3VFMZGTANCNFSM5QODOIAQ . You are receiving this because you authored the thread.Message ID: @.***>
I'm having the same issue with getting error: Access token is missing or refresh token is expired. I just regenerated my tokens and my caldav config looks like this:
[General]
Binary = calcurse
Hostname = apidata.googleusercontent.com
Path = /caldav/v2/<redacted>/events/
SyncFilter = cal
AuthMethod = oauth2
InsecureSSL = Yes
HTTPS = Yes
[OAuth2]
ClientID = <redacted>
ClientSecret = <redacted>
Scope = https://www.googleapis.com/auth/calendar
RedirectURI = http://127.0.0.1
The actual output (minus the auth URL) is as follows:
warning: Dry run; nothing is imported/exported. Add "DryRun = No" to the
warning: [General] section in the configuration file to enable synchronization.
If a browser window did not open, go to the URL below and log in to authorize syncing. Once authorized, pass the string after "code=" from the URL in your browser's address bar to calcurse-caldav.py using the "--authcode" flag. Example: calcurse-caldav --authcode 'your_auth_code_here'
<URL>
error: Access token is missing or refresh token is expired.
Any help would be much appreciated.