I have searched around and learned that to reply in same thread I need to use 0auth 2.0 connection with gmail. And I connected my gmail account with the http auth 2.0 module but it’s giving me 401 error unauthorized connection even though the connection was a success and I confirmed it with double checked all the credential like Client Secret and Client ID and it’s all correct. I’m just unsure what to add under the header Authorization : Bearer? what should I add that can help me fetch the access token?
You don’t need to include that header if you’ve set up your OAuth connection correctly, as it will already add it to the header for you.
Hey Sam, thanks for getting back.
When I remove these headers it starts giving me 404 error.
I’m really confused on how I can make this work.
Please let me know what am I doing wrong
Your URL is incorrect. You need to insert the USER id, not the email ID.
According to the Google API documentation,
1. Lists the drafts in the user’s mailbox
GET https://gmail.googleapis.com/gmail/v1/users/{userId}/drafts
2. Gets the specified draft
GET https://gmail.googleapis.com/gmail/v1/users/{userId}/drafts/{id}
Proof
Hope this helps! Let me know if there are any further questions or issues.
— @samliew
P.S.: Did you know, the concepts of about 70% of questions asked on this forum are already covered in the Make Academy. Investing some effort into it will save you lots of time and frustration using Make later!
Hey sam, now it’s giving me 404 error (using the url you shared). I want to use POST request to create a draft reply to a email in gmail in the same thread.