Forum Documentation Showcase Pricing Learn more

Google Oauth 401 message

Hello guys,

Is there something specific with Google when making a API call using OAuth ?

I can connect to spotify without any problems but it seems not to work with Google/Gmail.

I tried this & got the 401 error message :

Although, it works very well with the free Calendar Plugin


(NB: I also tested with “Authentication goes in the header” & Authorization Bearer but KO too)

… and all requests are OK in Postman.
Seems weird :wink:

Actually, I am trying the way described here : https://forum.bubble.is/t/access-gmail-emails-subject-body/51163/4

But I would appreciate some help if you know a better solution !
thanks !!!

Arf… I finally solved it :slight_smile: So simple but tricky !

For the ones with the same problem (as I didn’t find the answer anywhere) :

Don’t forget to put the userprofile in the scope you request. If not done, you get the 401 because you’re not authorized to land on the userprofile :

In my case, I added
https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
to the initial scope (https://www.googleapis.com/auth/gmail.readonly)
with between scopes