V.Dev
V.Dev

Reputation: 167

How to connect Bot framework composer with Azure app configuration to read value from there

I am new to bot composer. I have gone tutorial from this link Weather tutorial to build a weather bot. Here to get the weather report, it is sending Http request to some weatherbot url.

Instead of hardcoding that url in composer itself I want to read url from azure app configuration. Similar thing will require in my project.

Is there any way to do that, if there then please help me with this.

Please let me know if question is not clear or needed any more information.

Upvotes: 2

Views: 533

Answers (1)

ranusharao
ranusharao

Reputation: 1854

You can either set the URL in the appsettings.json/.env or in the azure app configuration and then you can access it similar to this structure:

  • Settings:

"weatherServiceURL" : "http://weatherbot-ignite-2019.azurewebsites.net/api/getWeather?zipcode=${user.zipcode}&api_token=${dialog.weatherToken}"

"weatherApiToken": "<ACTUAL API TOKEN HERE>"

  • Dialog:

dialog.weatherToken = settings.weatherApiToken

dialog.weatherUrl = settings.weatherServiceURL

Upvotes: 3

Related Questions