"Missing access token for authorization. Request: MailboxService.SendMessage" error when calling the Gmail API

Hi there,

Quite a technical question although I’m not someone who has technical background at all!

I managed to set up a “Make an Oauth 2.0” request to call the gmail API to automatically send an email in a specific thread using the thread ID variable I get in the Gmail Watch email module.

However, when I run the module I get this error: “Missing access token for authorization. Request: MailboxService.SendMessage” "

Any clue what that means and what I should change in order to solve the problem?

Here are two screenshots on how I set the module up


Also, here are the scopes i used when making the connection: https://www.googleapis.com/auth/gmail.addons.current.action.compose
https://www.googleapis.com/auth/gmail.send

Thank you!

You might need to grant additional scopes to send the message.

Check that you have selected all the available scopes for your GCP OAuth app, then try setting up the connection again.

samliewrequest private consultation

Join the unofficial Make Discord server to chat with us!

Hey Sam,

thanks for your reply.

So I have changed the scope to https://www.googleapis.com/auth/gmail.send and it seems to work now. At least I don’t get a 403 error any more.

Now what I get is a 400 error

Would you know what I did wrong in my “Request content” field?

For everyone, just figured out what was not working : the problem was that the ‘message’ in the body only can be used when you send an attachment in the email. So just with

{
“raw”: “{{7.Encoded message}}”,
“threadId”: “{{2.threadId}}”
}

That worked!

3 Likes