Hi I’m trying to send an email using gmail API.
I already have my credentials.json file and I also have a token.json file. My token.json file has the most restricted scope as you can see with the key:
“scopes”: [“https://mail.google.com/”]
Nonetheless, when I try to follow https://developers.google.com/gmail/api/guides/sending#python:~:text=snippet/send%20mail/-,send_message,-.py to send an email, I get the following error.
An error occurred: <HttpError 403 when requesting [https://gmail.googleapis.com/gmail/v1/users/me/messages/send?alt=json](https://gmail.googleapis.com/gmail/v1/users/me/messages/send?alt=json) returned "Request had insufficient authentication scopes.". Details: "[{'message': 'Insufficient Permission', 'domain': 'global', 'reason': 'insufficientPermissions'}]">