title: Error 400: invalid_scope "https://www.googleapis.com/auth/chat.bot"
body: <p>The documentation for the new google hangouts chat says that you need to authorize the scope <a href="https://developers.google.com/hangouts/chat/reference/rest/v1/spaces/get#authorization-scopes" rel="noreferrer">https://www.googleapis.com/auth/chat.bot</a> to do pretty much anything.</p>
  
  <p>Here's the error:</p>
  
  <p><a href="https://i.stack.imgur.com/aJF4S.png" rel="noreferrer"><img src="https://i.stack.imgur.com/aJF4S.png" alt="enter image description here"></a></p>
  
  <p>While generating an authentication URL using their <a href="https://github.com/google/google-api-nodejs-client#generating-an-authentication-url" rel="noreferrer">OAuth2 client</a> I get the message that the scope is invalid. I don't have that problem if I use <a href="https://www.googleapis.com/auth/chat" rel="noreferrer">https://www.googleapis.com/auth/chat</a> or some other scope like the one for <a href="https://developers.google.com/+/web/api/rest/oauth#authorization-scopes" rel="noreferrer">google plus</a>.</p>
  
  <p>When I try to google things on in the <a href="http://%20%20https://developers.google.com/apis-explorer/#search/bots/chat/v1/" rel="noreferrer">API Explorer</a> no combination of the URL or parts of the URL work either.</p>
  
  <p>Here is my code to fetch the URL, seems to work just fine for everything else:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var {google} = require('googleapis');
  var OAuth2 = google.auth.OAuth2;
  
  var oauth2Client = new OAuth2(
    "clientid-idididid.apps.googleusercontent.com",
    "_secretsuff",
    "http://localhost:3000/auth/google/callback"
  );
  
  var scopes = [
      "https://www.googleapis.com/auth/chat", //Works
      "https://www.googleapis.com/auth/chat.bot"  // Does not work
  ];
  
  var url = oauth2Client.generateAuthUrl({
    access_type: 'offline',
    scope:  scopes,
  });
  
  console.log(url);</code></pre>
  </div>
  </div>
  </p>