curl to gmail always un authorization in gcp

when i use 'curl' in gcp,i want get gmail information in,but always responds Unauthorized
then i try to another way in local-server use and it well be success

"curl -u USERNAME:PASSWARD --silent https://mail.google.com/mail/feed/atom"

0 3 431
3 REPLIES 3

@Myles Gmail doesn't use that kind of authentication, so this will never work (Google has spent a good deal of time making sure Gmail can't be accessed this way).

But this video is success and i try to local server same success

https://www.youtube.com/watch?v=wMyZx0B9Fpo

Sorry I didn't spot you were trying to access the atom feed. I've tested it and it works so I'm not sure what error you get.  I imagine the most likely issue is you cannot use (neither would you want to) your normal password: make sure you have 2-step verification enabled and create an app password.

Top Labels in this Space