title: IBM Watson error: Access is denied due to invalid credentials
body: <p>I am trying to integrate Watson discovery into my Watson assistant chatbot by following an IBM course on EDX. I followed the course instructions but when I add Watson discovery to my chatbot my web hooks returned this:</p>
  <blockquote>
  <p>{&quot;result&quot;:{&quot;err&quot;:&quot;Access is denied due to invalid credentials.&quot;}</p>
  </blockquote>
  <p>When I expected something like this:</p>
  <blockquote>
  <p>{&quot;result&quot;:{[&quot;courses&quot;:&quot;Data Science&quot;, &quot;courses&quot;:&quot;Ibm&quot;]}</p>
  </blockquote>
  <p>My <code>serverless.yml</code> file looks something like this:</p>
  <pre><code>custom:
    package: lab4
    discovery:
      username: apikey
      password: aaaaaaaaa
      environmentId: aaaaaaa
      collectionId: aaaaaaa
      url: https://gateway-lon.watsonplatform.net/discovery/api
      intent: course_recommendation # DO NOT CHANGE
  </code></pre>
  <p>Could anyone please guide me to where I went wrong and please tell me if you need to see any other code.
  Thank you.</p>