title: Invalid Credentials for OAUTH from Youtube API
body: <p>I am getting 401 Invalid Credentials error trying to use the Youtube API in the OAuth 2.0 Playground. </p>
  
  <p>Response is:</p>
  
  <pre><code>{
    "error": {
      "code": 401, 
      "message": "Invalid Credentials", 
      "errors": [
        {
          "locationType": "header", 
          "domain": "global", 
          "message": "Invalid Credentials", 
          "reason": "authError", 
          "location": "Authorization"
        }
      ]
    }
  }
  </code></pre>
  
  <p>Steps can be reproduced <a href="https://developers.google.com/oauthplayground/#step1&amp;apisSelect=https%3A//www.googleapis.com/auth/userinfo.profile%2Chttps%3A//www.googleapis.com/auth/userinfo.profile%2Chttps%3A//www.googleapis.com/auth/youtube%2Chttps%3A//www.googleapis.com/auth/youtube.readonly&amp;auth_code=4/KfKIMGVBI39UMOudJa4ZSOB9dGUM.IjPmXuwpWuATgrKXntQAax1wu-kDigI&amp;url=https%3A//www.googleapis.com/youtube/v3/channels%3Fpart%3DcontentDetails%26forUsername%3DGoogle&amp;content_type=application/json&amp;http_method=GET&amp;useDefaultOauthCred=unchecked&amp;oauthEndpointSelect=Google&amp;oauthAuthEndpointValue=https%3A//accounts.google.com/o/oauth2/auth&amp;oauthTokenEndpointValue=https%3A//accounts.google.com/o/oauth2/token&amp;includeCredentials=unchecked&amp;accessTokenType=bearer&amp;autoRefreshToken=unchecked&amp;accessType=offline&amp;forceAprovalPrompt=checked&amp;response_type=code" rel="noreferrer">here</a>. </p>
  
  <ol>
  <li>Select Manage Youtube account API</li>
  <li>Authorize</li>
  <li>Get access token</li>
  <li>Attempt to call any Youtube API (you may need to plug your own API key in as well)</li>
  </ol>
  
  <p>The access token is valid (non-Youtube API calls work fine) and I have tried this with a number of different accounts which have Youtube accounts and channels set up (so the reply <a href="https://stackoverflow.com/a/17555659">here</a> is not what's happening). </p>
  
  <p>The API works fine in the <a href="https://developers.google.com/youtube/v3/docs/channels/list#try-it" rel="noreferrer">Try it Now</a> section here so this is quite strange.</p>
  
  <p>Maybe somebody can try these steps with their account and verify if the outcome is the same or not?</p>