'calling rest api from azure healthbot using JS

I am trying to make a call to a REST endpoint using JS code from the Azure health-bot service,

I am making use of the request-promise package which is whitelisted in the MS doc: https://docs.microsoft.com/en-us/healthbot/scenario-authoring/advanced_functionality#white-listed-packages

var request = require('request-promise');

However I am getting the following error: "Usage of the 'request-promise' package is not allowed. Please contact your system administrator"

Do you know: 1. Why I am getting this error? 2. how can I make a REST call from a JS script?

Thanks



Solution 1:[1]

Your question "from the Azure health-bot service". Do you mean you are in a Healthbot scenario and trying to make this call? if so, you don't just code it in javascript in an Action step, you add a Data Connection step to your dialog flow.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Flatpick13