title: Google cloud dialogflow intent detection nodejs example not working
body: <p>I am trying to implement a very simple dialogflow agent integration with nodejs.</p>
  
  <p>Here is what I did so far</p>
  
  <ul>
  <li>I followed the code from <a href="https://cloud.google.com/dialogflow-enterprise/docs/detect-intent-text" rel="nofollow noreferrer">Intent detection</a></li>
  <li>I added the service account private key file <code>.json</code> to my server.</li>
  <li>I added the environment variable <code>GOOGLE_APPLICATION_CREDENTIALS</code> with the path to my <code>.json</code> private key file.</li>
  </ul>
  
  <p>Here is the code I am trying to run right now:</p>
  
  <pre><code>require('dotenv').config()
  const projectId = 'gg-chatbot-216808'; 
  const sessionId = 'quickstart-session-id';
  const query = 'hello';
  const languageCode = 'en-US';
  
  // Instantiate a DialogFlow client.
  const dialogflow = require('dialogflow');
  const sessionClient = new dialogflow.SessionsClient();
  
  // Define session path
  const sessionPath = sessionClient.sessionPath(projectId, sessionId);
  
  // The text query request.
  const request = {
      session: sessionPath,
      queryInput: {
          text: {
              text: query,
              languageCode: languageCode,
          },
      },
  };
  
  // This prints the private key path correctly.
  console.log(process.env.GOOGLE_APPLICATION_CREDENTIALS);
  
  // Send request and log result
  sessionClient
      .detectIntent(request)
      .then(responses =&gt; {
          console.log('Detected intent');
          const result = responses[0].queryResult;
          console.log(`  Query: ${result.queryText}`);
          console.log(`  Response: ${result.fulfillmentText}`);
          if (result.intent) {
              console.log(`  Intent: ${result.intent.displayName}`);
          } else {
              console.log(`  No intent matched.`);
          }
      })
      .catch(err =&gt; {
          console.error('ERROR:', err);
      });
  </code></pre>
  
  <p>Then I get this error in the console when I run this file</p>
  
  <pre><code>Auth error:Error: invalid_user: Robot is disabled.
  ERROR: { Error: 14 UNAVAILABLE: Getting metadata from plugin failed with error: invalid_user: Robot is disabled.
      at Object.exports.createStatusError (/var/www/html/google_auth/node_modules/grpc/src/common.js:87:15)
      at Object.onReceiveStatus (/var/www/html/google_auth/node_modules/grpc/src/client_interceptors.js:1188:28)
      at InterceptingListener._callNext (/var/www/html/google_auth/node_modules/grpc/src/client_interceptors.js:564:42)
      at InterceptingListener.onReceiveStatus (/var/www/html/google_auth/node_modules/grpc/src/client_interceptors.js:614:8)
      at callback (/var/www/html/google_auth/node_modules/grpc/src/client_interceptors.js:841:24)
    code: 14,
    metadata: Metadata { _internal_repr: {} },
    details: 'Getting metadata from plugin failed with error: invalid_user: Robot is disabled.' }
  </code></pre>