So i am trying to make this get request to the GMAIL message endpoint:
https://www.googleapis.com/gmail/v1/users/test%40email.com/messages?q=from%3Asender%40test.com+is%3Aread&key=MYKEYHERE
But I keep getting a 401 error about login.
"code": 401,
"message": "Login Required"
I already authenticated the user with: var SCOPES = ['https://mail.google.com/'];
I know this is an Auth issue but dont know how to solve it. Am I suppose to autheticate the user ever time I need to use the api? What do I do?
How can I make this get request from the app that is authroized?
I have it working in the google testing tool here
*new to oauth2 and appreciate your help. thanks