I am trying to write a Django app which creates events in a specific Google calendar. So far I have been successful. There is only a little problem:
I don\'t
If you follow this manual https://developers.google.com/identity/protocols/OAuth2WebServer and you can not receive refresh_token, try to add prompt='consent' here:
authorization_url, state = flow.authorization_url(
# Enable offline access so that you can refresh an access token without
# re-prompting the user for permission. Recommended for web server apps.
access_type='offline',
prompt='consent',
# Enable incremental authorization. Recommended as a best practice.
include_granted_scopes='true')
Here is described why it can happen