Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Gmail API "Request had insufficient authentication scopes."

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:

Nonetheless, when I try to follow https://developers.google.com/gmail/api/guides/sending#python:~:text=snippet/send%20mail/-,send_mess... 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 returned "Request had insufficient authentication scopes.". Details: "[{'message': 'Insufficient Permission', 'domain': 'global', 'reason': 'insufficientPermissions'}]">

```

Solved Solved
0 2 2,243
1 ACCEPTED SOLUTION

Since you are calling the gmail API from code (I suspect), I would recommend reposting to the Workspace developer forum for APIs here.  You can also find all the gmail scopes here in the documentation

If you would like to try this using Low-code, you can use Application Integration with our Gmail connector (docs)...

Cheers,

Scott

View solution in original post

2 REPLIES 2

Since you are calling the gmail API from code (I suspect), I would recommend reposting to the Workspace developer forum for APIs here.  You can also find all the gmail scopes here in the documentation

If you would like to try this using Low-code, you can use Application Integration with our Gmail connector (docs)...

Cheers,

Scott

Thank you Shaaland. 

Top Labels in this Space