can we create a custom chat page for bot application? - azure

I am building a bot with the Microsoft bot framework. I don't want to use bot(other than webchat) emulator and don't want to use Azure also.I want to host my bot in local IIS only. Instead of using bot emulator I want to create my own custom chat page for chat with bot. I checked this but didn't get any idea. Is there any way to do so?
Please help. Thanks.

If you've internet connection you can use ngrok to make your local address public. Then, for endpoint use generated address from ngrok. At the end, send web chat to your testers.

Related

How to Auth from an external service to the bot framework?

I have an external service with is own database where the users can log in.
Now I have a bot in NodeJS using Bot Builder and the Bot Framework.
I want to link them.
Is there anyway that the bot recognize the users from the other service everytime they open a new conversation and everytime they write something in the bot?
I've just tried with web chat before and I know that with channels that they support like Facebook, Telegram, Skype etc is easy to recognize the users every time they come back, but I don't know how if it is possible to do this with an external service where the users are already logged in and they want to talk with the chatbot.
I don't know how could I generate an authtoken or something that the bot framework read it and recognize the user.
You can use the DirectLine API to allow your bot and a custom client to communicate to each other, a sample can be found here, and here if you want to use WebSockets.
You can also add authentication to your bot via Azure Bot Service to use OAuth as stated here, where you will find samples too.

No response from bot after publishing to Azure

I've built a bot locally on my PC, using the Microsoft Bot Builder v3.15.2.2 NuGet package.
Using the bot emulator v3.5.3.6 on my PC, I can connect to the bot and interact with it. After I published the bot to our Azure envirnoment, and using the Test in Web Chat option in the Bot Service page for my bot, I notice that the bot is not responding. I enter a message, press enter, but nothing comes back from the bot.
I have registered the bot using the https://apps.dev.microsoft.com/ website, and I copied the app ID and password from that site into the app settings of my bot web.config file. I can verify that those settings appear correct in the Application settings tab for my Azure Web App for the bot.
I've spent a long time looking at log streams, and diagnostic files via Kudu, but it's not clear to me why there is no response coming back from the bot. As another test, I edited the default.htm file of the project to include an iframe to host the bot chat window (the iframe code was obtained via the Channels tab on the bot service page). When I typed into the iframe, the same result occurs - I do not get a response from the bot.
Remote debugging with Visual Studio isn't really an option, as our company has strict security in place, and I doubt they will be willing to open ports for me to attach Visual Studio to the Azure Web App.
I'm at a standstill here, since I do not know what to do look for in diagnosing the issue. Any suggestion would be appreciated.
EDIT
I opened the DevTools and attempted to chat with the bot using the `Test in Web Chat tab in Azure. The following error was caught in the console window:
botchat.js:20 WebSocket connection to 'wss://webchat.botframework.com/v3/directline/conversations/<FOO>/stream?watermark=-&t=<FOO>' failed: Error during WebSocket handshake: Unexpected response code: 400
Note that I replaced token values with <Foo> for privacy. I hope this might be useful clue for someone.
Make sure your messaging endpoint is set to https://{botname}.azurewebsites.net/api/messages in the bot settings.
The problem was to do with our network proxy.
Basically, since testing the bot in Azure Portal uses websockets, our proxy by default blocks websocket access. So, boom, no response from the bot.
By changing our network settings for the bot config, we are no receiving responses from the bot.

Customise Azure bot framework in NodeJs using DirectLine JS

I am looking for a solution which has Customised Azure bot in website. I am not looking for an iFrame integration, As i have already explored. I need a solution which gives me an option to make UI changes in the bot window and invoke Live agent Chat window(Third party) from the existing Chatbot.
I tried these link below which dint help
https://github.com/Microsoft/BotFramework-WebChat
I understand exactly what you need.
It's true that the github url you pasted won't help but I know you'll get a lot of tips from the Direct Line and DirectLineJS documentation from the Advanced part.
You simply need a way to integrate to the Bot Framework from your existing UI system and hence using the Bot as just an Endpoint.
Your solution lies in the actual implementation methods for various channels that is supported by Bot Framework. Take Skype or Facebook for instance.
You need to study and configure WebHooks, Direct-Line Channels.
First: Use the Azure Portal to add a new website to your Bot in Channel property.
Secret Keys would be generated for you after then you can configure for version 1.1 or 3.0.
Check the Documentation here: https://learn.microsoft.com/bot-framework/rest-api/bot-framework-rest-direct-line-concepts
Now your site can be configured to talk to the Bot Framework via Web Clients and Sockets as API requests.
With these, you have the priviledge to use your own UI with the Bot Framework.

Can I use Skype Web SDK to build a IM Chat Bot for Skype for Business/Skype?

I need to be able to initiate a connection from the bot to a SfB user. The bot will be making the connection as a published Web App on Azure.
The bot can have its own SfB id and will message people from there.
If it can be achieved for Skype instead of SfB, I'd still like to know how I would go about implementing a solution for that.
The Bot term here is misleading me a bit, but from the scenario you mentioned, it sounds like a chat between a Web App using the Skype Web SDK and an SfB client. As long as the Web App is using a SfB creds, that should be possible.
You can't use SfB with bot framework right at the moment. But you can use skype instead. To create a bot which work with the skype please follow the below steps.
First register a new bot inside the bot framework. Click here. Keep in mind that you need Microsoft account for that.(outlook, live)
Then download bot application template from here. Save the zip file to your Visual Studio 2015 templates directory which is traditionally in “%USERPROFILE%\Documents\Visual Studio 2015\Templates\ProjectTemplates\Visual C#"
After that you can download bot emulator to check your bot from here
Add your AppId and AppSecret (You can find that from the bot registration dash board) inside web config file. Then run your application and check whether you get the same wording you send through the emulator.
If all are working you can connect it to the skype like this. First go to dashboard in web. Enable skype and there you can find few steps to follow. If you success with that steps you can see your bot inside your skype where you can communicate. *For publish to public crowd it takes time and your bot go through a quality process which handle by Microsoft.
FYI - Skype for Business was announced as a new channel today on Build 2017 :)

Messaging Webhook for Microsoft skype bot

I'm setting up a Microsoft Skype bot, and I want to be able to have it post messages to individual and group chats. I have added a bot at https://developer.microsoft.com/en-us/skype/bots/manage and checked the Messaging checkboxes, but there's a field for "Messaging Webhook", which says "The HTTPS URL to send chat messages and content to. Required if you have a chat capability". What do I put in this field? There's no obvious help link. Do I need to set up an Azure website?
Solution for Node.js:
If you want to test your bot locally, you need to follow the instructions for ngrok described in the comments of this example and this guide. Once you run ngrok, you will obtain a HTTPS URL such as https://62a8271e.ngrok.io. You then need to append /api/calls to this URL, i.e. the webhook URL you need to enter in the Skype channel configurations and as environment variable "CALLBACK_URL" would be https://62a8271e.ngrok.io/api/calls.
If you want to test your bot globally and you have deployed it as an Azure web app, you need to replace the ngrok URL with your bot URL, i.e. the URL should look something like https://yourbot.azurewebsites.net/api/calls. Don't forget to add this URL as an environment variable in your web app settings as well.

Resources