self.flow = OAuth2WebServerFlow(client_id=self.client_id, client_secret=
    self.client_secret, scope=self.SCOPE, user_agent=user_agent,
    redirect_uri='urn:ietf:wg:oauth:2.0:oob', access_type='offline',
    approval_prompt='force')
Google Calendar API v3 - How to obtain a refresh token (Python)