Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I've built a small basic web bot app using bot framework and want to deploy it on Azure. I've followed all the steps and it's working fine under "Test in Web Chat" of Azure Portal too, but however as I open my bot's endpoint

https://optlbot.azurewebsites.net/api/messages

I get an error saying

The requested resource does not support http method 'GET'

Can somebody please help me, I can't debug my application at all. I've also tested on emulator and there too it's working fine.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
214 views
Welcome To Ask or Share your Answers For Others

1 Answer

Yes, the URL https://optlbot.azurewebsites.net/api/messages works only for POST request and not a GET request, because you post a message from user to bot and not a get, you can see that in the MessagesController code.

Being said that, if you want to test your bot locally, you have to use the emulator. You can have a look at Bot emulator for the same.

Now if you want to publish the bot to the world so that others can see it and use it, so that's where the channel comes in. Consider channel as a medium by which you enable your bot for others to use with a much better user experience.

There are multiple channels available for the bot to be published in, and yes you can publish the same bot in all the channels.webchat is just one channel and the one which is enabled by default and the way to see it is :

  1. Open your bot in the Azure Portal and click Channels blade.
  2. Click Edit for the Web Chat channel
  3. Under Secret keys, click Show for the first key enter image description here
  4. Copy the Secret key and the Embed code.
  5. Click Done

So the embed code is actually an iframe which you can place in your website or share with others who want to use your bot. Or you can use the src of the iFrame too to reach the bot directly.

Again this is just one channel. You can take a look at the Configure channels documentation for steps to enable the bot in more channels like Skype, Microsoft Teams, Email, Facebook, Slack, Telegram, etc.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...