title: IBM IAM API KEY AUTHENTICATION ERROR
body: <p>I am executing the code below.. I have supplied the correct API but keep getting an authentication error (provided below)</p>
  
  <p>Here's the code snippet</p>
  
  <pre><code>// Example 1: sets up service wrapper, sends initial message, and
  // receives response.
  
  const AssistantV2 = require('ibm-watson/assistant/v2');
  
  // Set up Assistant service wrapper.
   const service = new AssistantV2({
    iam_apikey: 'xxx', // replace with API key
    version: '2019-02-28',
  });
  
  const assistantId = 'xxx'; // replace with assistant ID
  let sessionId;
  
  </code></pre>
  
  <p>Here's the error message</p>
  
  <pre><code>C:\Users\User\Desktop\Insurancebot\test&gt;node sample.js
  { Unauthorized: Access is denied due to invalid credentials.
      at RequestWrapper.formatError (C:\Users\User\node_modules\ibm-cloud-sdk-core\lib\requestwrapper.js:219:21)
      at C:\Users\User\node_modules\ibm-cloud-sdk-core\lib\requestwrapper.js:207:29
      at process._tickCallback (internal/process/next_tick.js:68:7)
    name: 'Unauthorized',
    code: 401,
    message: 'Access is denied due to invalid credentials.',
    body: '{"code":401,"error":"Unauthorized"}',
    headers:
     { 'x-backside-transport': 'FAIL FAIL',
       'content-type': 'application/json',
       'x-dp-transit-id': 'gateway02-3627341245',
       'x-global-transaction-id': 'ffea405d5d0083b9d834d5bd',
       'strict-transport-security': 'max-age=31536000;',
       'x-dp-watson-tran-id': 'gateway02-3627341245',
       'content-length': '37',
       'x-edgeconnect-midmile-rtt': '110',
       'x-edgeconnect-origin-mex-latency': '132',
       date: 'Wed, 12 Jun 2019 04:46:49 GMT',
       connection: 'close' } }
  </code></pre>