title: How to achieve silent login and get code/token from google using OAuth 2
body: <p>I am new to google oath ,</p>
  
  <p>Referring to the documentation of google</p>
  
  <p>While i Generate the login URL
  example </p>
  
  <pre><code>https://accounts.google.com/o/oauth2/auth?
  redirect_uri=http://www.mywebapp.com/oauth2callback&amp;
  response_type=code&amp;
  client_id=104608secret-secret-secret-secret.apps.googleusercontent.com&amp;
  scope=https://www.googleapis.com/auth/analytics.readonly+https://www.googleapis.com/auth/userinfo.email&amp;
  approval_prompt=force&amp;
  access_type=offline
  </code></pre>
  
  <p>This <strong>redirects</strong> to an <strong>accept</strong> page showing google <strong>email Id</strong></p>
  
  <p>When the user clicks on “Accept” google will redirect the user to your given redirect_url </p>
  
  <p>when i use chrome and 
  <a href="https://developers.google.com/oauthplayground/" rel="nofollow noreferrer">https://developers.google.com/oauthplayground/</a> 
  Because it redirects screen to accept.
  everything will work fine.</p>
  
  <p>But when i use postman it wont return the "access code" of google</p>
  
  <p>What am i making wrong in the url parameters  .</p>
  
  <p>I have to create rest service using the above url. </p>
  
  <p>I have searched So for 
  <a href="https://stackoverflow.com/questions/25657190/how-to-get-dummy-google-access-token-to-test-oauth-google-api">How to get dummy google access token to test oauth google api?</a>
  <a href="https://stackoverflow.com/questions/359472/how-can-i-verify-a-google-authentication-api-access-token?rq=1">How can I verify a Google authentication API access token?</a>
  <a href="https://developers.google.com/identity/protocols/OAuth2" rel="nofollow noreferrer">https://developers.google.com/identity/protocols/OAuth2</a>
  <a href="https://www.themarketingtechnologist.co/google-oauth-2-enable-your-application-to-access-data-from-a-google-user/" rel="nofollow noreferrer">https://www.themarketingtechnologist.co/google-oauth-2-enable-your-application-to-access-data-from-a-google-user/</a></p>
  
  <p>But non explained about silent login to get token without accept screen</p>