2

I am calling an IBM cloud function (https://eu-gb.functions.cloud.ibm.com/api/v1/web/akash_IBM_dev/default/Demo) from IBM Watson assistant chatbot webhook and getting error - "Webhook call failed; response code 401 Unauthorized. Add the Authorization header under your skill options (or under workspace.webhooks.headers). (and there is 1 more error in the log)".

In the documentation it was mentioned "Cloud Functions web actions do not need to be authenticated" so I have not added headers in webhook option.

How to resolve it ?

akash
  • 51
  • 1
  • 4

1 Answers1

2

This got resolved:

  1. Use the REST API alternative (https://eu-gb.functions.cloud.ibm.com/api/v1/namespaces/akash_IBM_dev/actions/Demo)
  2. Add "?blocking=true" in the URL, (https://eu-gb.functions.cloud.ibm.com/api/v1/namespaces/akash_IBM_dev/actions/Demo?blocking=true)
  3. Add basic authorization (from the api key, value before colon as Username and after one as password).
Tomer Shetah
  • 8,413
  • 7
  • 27
  • 35
akash
  • 51
  • 1
  • 4
  • We got same issue .It got resolved by using above 3 steps Just an addon:you can find API key here: https://cloud.ibm.com/functions/namespace-settings – santhosh ketha Dec 24 '20 at 04:53