title: Using postman + oauth2 to access Google Apps Admin SDK
body: <p>I am struggling to get oauth2 working between postman and the Google Apps Admin Sdk. I have created a client app in the google console and set the Authorized redirect URIs to <code>https://www.getpostman.com/oauth2/callback</code> and my settings in postman are as follows</p>
  
  <pre><code>Auth URL          - https://accounts.google.com/o/oauth2/v2/auth
  Access Token URL  - https://www.googleapis.com/oauth2/v4/token
  Client Id         - some id here
  Client Secrent    - some secret here
  Scope             - https://www.googleapis.com/auth/admin.directory.user.readonly
  Token Name        - Google
  Grant Type        - Authorization Code
  Request Access Token Locally - Checked
  </code></pre>
  
  <p>This returns a token - <code>xyz</code> - after logging in.</p>
  
  <p>I do a <code>GET</code> request with the token in the url</p>
  
  <pre><code>https://www.googleapis.com/admin/directory/v1/users?key=xyz
  </code></pre>
  
  <p>The error I am getting is below</p>
  
  <pre><code>{
    "error": {
      "errors": [
        {
          "domain": "global",
          "reason": "required",
          "message": "Login Required",
          "locationType": "header",
          "location": "Authorization"
        }
      ],
      "code": 401,
      "message": "Login Required"
    }
  }
  </code></pre>
  
  <p>From what I have read this should work. Where else do I have to login? What am I doing wrong?</p>