I am a new bee in using POSTMAN - Rest Client - Chrome API
I want to use the Basic Auth
which is available in POSTMAN.
I am trying to login into my Google account at url
- "https://www.gmail.com".
I provided my Username & Password
in the Basic Auth
and I had tried GET and POST
.
I got a Status 200 OK
which loads me the home page
but it is not logged in.
I know that i need to change the url, but i am not able to find the correct one which to use?
It would be helpful if @examples are provided for the Different Types of Auth Provided as well.
The link you have provided is deprecated. I don't know if the Gmail API allowed Basic Auth at the time you asked the question, but right now it needs OAuth 2.0, as indicated in the opening lines here.
The correct url is https://accounts.google.com/o/oauth2/auth
, and this link explains how to supply the parameters.
If I remember correctly, Google stopped allowing http clients(like Postman) accessing its APIs through Basic Auth one year back or more. Now, Google allowing its APIs to be accessed using OAuth 2.0.
For accessing Google APIs, you need to setup an OAuth Application, here When you create this OAuth Application, Google will generate ClientId and ClientSecret.
With these clientId and clientSecret, you need to generate Access and Refresh Tokens and eventually, you will use these tokens to access Google APIs. Read more about Google OAuth 2.0 and you will get more information about accessing APIs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With