title: Google My Business: How to generate access token without user interaction
body: <p>I want to use a Google My Business API to search and manage the businesses of our clients using my organization account detail.</p>
  <p>I want to use API as an Agency as I want to manage our clients' businesses.</p>
  <p>I've submitted the API access form and got confirmation to use the APIs.
  Also, I've generated the OAuth credentials and service-account in the same account.</p>
  <p>But as per the GMB API document, we need to pass an access token in order to access an API.</p>
  <p>I've reviewed the authentication process using OAuth and service accounts.
  As per my requirement, I want to generate access token at the back end side directly from my NodeJS server code without user interaction.</p>
  <p>I want to use my account detail to use APIs so need to get permission from the user as I do not need any user information.</p>
  <p>I've tried the following for use as a service-account but it returns an error.</p>
  <pre><code>const keys = require(&quot;./config/gmb.json&quot;);
  const {OAuth2Client,GoogleAuth,JWT} = require('google-auth-library');
  const client = new JWT({
     email: keys.client_email,
     key: keys.private_key,
     scopes: ['https://www.googleapis.com/auth/business.manage'],
  });
  console.log(client.credentials);  // It returns refresh_token=jwt-placeholder, expiry_date=1
  const tokenInfo = await client.getTokenInfo(client.credentials.access_token); // It returns Error: invalid_token 
  </code></pre>
  <p>So anyone has an idea on this.
  Your help will appreciatable.</p>