Google Calendar API Documentation Missing
See original GitHub issueEnvironment details
- OS: MacOS Catalina
- Python version: 3.6.9
- pip version: 19.3.1
- google-api-python-client==1.7.11
- google-auth-httplib2==0.0.3
- google-auth-oauthlib==0.4.1
- google-auth==1.10.1
Steps to reproduce
- It states here https://developers.google.com/calendar/v3/sync that a GoogleJsonResponseException will be returned in Java if a sync token can not be returned. Currently I have the following:
events = service.events().list(calendarId='primary', syncToken=sync_token, pageToken=page_token).execute()
except Exception as e:
if 'code' in e and e.code == 410: #sync token was invalidated, full sync required
#clear token, call full sync
Is there documentation in python for how an invalidated sync token is handled?
- Is there python documentation that shows the client library automatically refreshing the access token after .execute()? For example, doing the following appears to show the client library automatically refreshing my access token:
credentials = pickle.loads(user.google_api_credentials)
print(credentials.valid) #false
event_results = service.events().list(calendarId='primary', singleEvents=True).execute()
print(credentials.valid) #true after calling .execute() in the line above.
Does this confirm using the python library will guarantee automatic refreshing of the access_token without requiring extra code?
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Handle API errors | Google Calendar
The rest of this page provides a reference of Calendar errors, with some guidance on how to handle them in your app. We...
Read more >Google Calendar - SyncToken is missing in API response
This is why the nextSyncToken is not showing up. As mentioned on the documentation on Events: list -> Parameters -> syncToken : Token...
Read more >Google Calendar ... calendars lost and no summary/name ...
Since we use the calendar for business scheduling, it is actually a very bad situation. I found out when using https://developers.google.com/apis-explorer/#p/ ...
Read more >Authenticate using API keys - Google Cloud
Document processing and data capture automated at scale. Product Discovery. Google-quality search and product recommendations for retailers. APIs and ...
Read more >Google Calendar API Documentation
Swagger documentation To access the Google Calendar API Swagger documentation directly, navigate to Google Calendar API Documentation .
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try these imports:
To the best of my knowledge,
RefreshError
happens when the sync token is invalided for any number of reasons such as the user changes their password, manually revokes permissions, or they’ve used the same token for 6 months.You’ll need to account for
RefreshError
in your code as well. When we get aRefreshError
, we sign them out of google calendar and give the user a message that they need to reconnect.@jason-cf Thanks. This might be a silly question, but what is
RefreshError
?Also, when I do
I am still not catching the error. Is there something I am missing?