Asynchronous API calls

Hi, I am new to bot development and currently building bot only in botbuilder. Haven’t channelized yet. I am trying to make API calls asyncronously(Since response time is more than 20 seconds), and i would like to display msg to user that once result is available, he will be notified or somthing like that. So once API response is available(say after 2 mins), I have to show that to user. I tried using webhook node too. But its really confusing. Since I am completely new to bot dev, any detailed procedure to achieve this in development env would be really helpful.

@s1.ramya
Please let me know if this helps

This seems little bit confusing. If i understand correctly, we first have to download botkit SDK and register this botkit SDK.

In SDK config.json, we need to give callback url in case when webhook node is encountered in dialog task, it will push the data to the callback url

In my case, I need the data back in chat window instead of any application url. In that case what should be that callback url?

We couldn’t really follow documentation for this. Is there any live demo or something for this?

@swagata.sengupta @yogaramya.mendu Kindly help with the query

  1. What is the call back url[In websdk config.json and while subscribing app] if webhook has to post data back to chat window?
  2. I am running sdk in my local machine, kor agent in remote server. Added bot id, client id to config file. How does my bot know where my sdk is running?

@s1.ramya
There is no config.json in webSDK. do you mean botkit? These two are different libraries and are used for different purposes.
Assuming that you are talking about botkit here is what my config.json looks like.
callback URL needs to be updated on the bot and not config.json. Your botkit is supposed to run as a service. The callback URL is something using which the bot can reach that service. If you are running botkit from local machine, you will need something to expose the port. Something like ngrok (there can be other mechanisms too - I will leave it up to you/your organization how you want to expose the service)

Please see if this link helps you. https://developer.kore.ai/docs/bots/sdks/kore-ai-botkit-sdk-tutorial/