IBM / slack-watson-bot

**IN PROGRESS** Sample Bots for Slack and Facebook Messenger using IBM Watson and Botkit
Apache License 2.0
24 stars 26 forks source link

IBM Watson Connection Details Not Working #2

Open HARVS1789UK opened 5 years ago

HARVS1789UK commented 5 years ago

I am trying to connect to an IBM Watson Assistant of my own and I am having difficulties.

Since you have created the constants defined in the.env file, the IBM UI has probably changed as I can find no credentials with any of the following names:

CONVERSATION_USERNAME CONVERSATION_PASSWORD WORKSPACE_ID

I attach a redacted screenshot showing the IBM Watson API credentials I have used for each of these constants (I am assuming their naming conventions have just changed slightly), but I am still having trouble with Watson authentication.

ibm-watson-assistant-api-credentials-ui

Below is what I am returned in the watsonError property of each message:

  watsonError:
   { Error: Unauthorized: Access is denied due to invalid credentials.
       at Request._callback (/Users/joeharvey/Development/watson-bot/node_modules/watson-developer-cloud/lib/requestwrapper.js:102:21)
       at Request.self.callback (/Users/joeharvey/Development/watson-bot/node_modules/watson-developer-cloud/node_modules/request/request.js:185:22)
       at Request.emit (events.js:182:13)
       at Request.<anonymous> (/Users/joeharvey/Development/watson-bot/node_modules/watson-developer-cloud/node_modules/request/request.js:1157:10)
       at Request.emit (events.js:182:13)
       at Gunzip.<anonymous> (/Users/joeharvey/Development/watson-bot/node_modules/watson-developer-cloud/node_modules/request/request.js:1079:12)
       at Object.onceWrapper (events.js:273:13)
       at Gunzip.emit (events.js:187:15)
       at endReadableNT (_stream_readable.js:1098:12)
       at process.internalTickCallback (internal/process/next_tick.js:72:19)
     cause:
      { Error: Unauthorized: Access is denied due to invalid credentials.
          at Request._callback (/Users/joeharvey/Development/watson-bot/node_modules/watson-developer-cloud/lib/requestwrapper.js:102:21)
          at Request.self.callback (/Users/joeharvey/Development/watson-bot/node_modules/watson-developer-cloud/node_modules/request/request.js:185:22)
          at Request.emit (events.js:182:13)
          at Request.<anonymous> (/Users/joeharvey/Development/watson-bot/node_modules/watson-developer-cloud/node_modules/request/request.js:1157:10)
          at Request.emit (events.js:182:13)
          at Gunzip.<anonymous> (/Users/joeharvey/Development/watson-bot/node_modules/watson-developer-cloud/node_modules/request/request.js:1079:12)
          at Object.onceWrapper (events.js:273:13)
          at Gunzip.emit (events.js:187:15)
          at endReadableNT (_stream_readable.js:1098:12)
          at process.internalTickCallback (internal/process/next_tick.js:72:19)
        code: 401,
        error: 'Unauthorized',
        body: 'Unauthorized',
        'x-global-transaction-id': '7ecac92c5c091449e4751229' },
     isOperational: true,
     code: 401,
     error: 'Unauthorized',
     body: 'Unauthorized',
     'x-global-transaction-id': '7ecac92c5c091449e4751229' } }

Can anyone provide an insight into what the correct mapping of the credentials is and what I am doing wrong?

HARVS1789UK commented 5 years ago

I am told via the Watson Development Community Slack channel:

We've moved from basic auth using username/pass, to iam using apikey.

Which probably explains why my assistants (created within the last two weeks) are unable to authenticate using this codebase.

Would that be accurate?

thisisalbertocantu commented 4 years ago

Hi, Did you find the answer?