About a week ago I set up an application on google. Now when I tri and run:
SCOPES = ['https://www.googleapis.com/auth/gmail.readonly']
creds = None
if os.path.exists('token.pickle'):
with open(self.CREDENTIALS_PATH+self.conjoiner+'token.pickle', 'rb') as token:
creds = pickle.load(token)
if not creds or not creds.valid:
if creds and creds.expired and creds.refresh_token:
creds.refresh(Request()) ##error here
I get the following error:
Exception has occurred: RefreshError
('invalid_grant: Token has been expired or revoked.', {'error': 'invalid_grant', 'error_description': 'Token has been expired or revoked.'})
What could be the problem?