I am trying to fetch the Gmail Inbox RSS feed using curl:
curl -H "Authorization: Bearer <my token>" https://mail.google.com/mail/feed/atom
The above command fails to fetch the feed and I get the following in my terminal.
<HTML>
<HEAD>
<TITLE>Unauthorized</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Unauthorized</H1>
<H2>Error 401</H2>
</BODY>
</HTML>
I have read-only access available to my token. Is it insufficient? I've also tried accessing the feed using simple GET https://mail.google.com/mail/feed/atom command and then providing my credentials through the terminal. That fails as well. Though I am able to load it properly in my web browser. What am I missing here?
Also, I'd like to state that I don't have a GSuite account.