Bot Framework always gets an unauthorized response

I started using the Microsoft Bot Framework and followed all the tutorials. I was able to register a new bot and deploy it, working well with the emulator, but nothing works except for it. The test connection with your bot-chat does not work, despite the fact that I get a response from the emulator and all connected channels, that where it was created and registered correctly, I always get an unauthorized answer or something like that, anyway no answer, so nothing works. I tried with Twilio, web chat, Telegram (Skype auth on hold), always getting the same answer. It seems to me that I strictly followed the textbooks, is there anything else to do or approve of? Or is it just that the service is not yet working 100% as too young?

thanks

+5
source share
7 answers

If you are using HTTP, you need to disable basic auth because the connector will not send your appSecret to the box.

The solution is to make sure you are logged in as HTTPS, or if you need to use HTTP, then disable basic auth.

+3
source

I solved the problem. This has been linked to https. It is not well explained in the tutorial, but when you create and publish the service in Azure, it is created as http://XXXXXXX.azurewebsites.net , as described in the tutorial, but it will not work, since your service should work in https. I used https://startssl.com to create a free ssl certificate, and then included SSL in my Azure service to make it work.

+2
source

I cleaned up the beginning with the following: we hope this becomes clearer for the next person who uses it:

Click the "Register bot" button and fill out the form. Many fields in this form are subject to change later. Use the endpoint created when you deployed Azure, and remember that when using the Bot application template, you need to extend the URL that you pasted using the path to the endpoint in / API / messages. You must also prefix your URL using HTTPS instead of HTTP; Azure will take care of providing HTTPS support for your bot. Save the changes by clicking Create at the bottom of the form.

+2
source

The time has come to get him to work locally. Oddly enough for me, this only works when these "secret" fields are empty, as mentioned and working in debugging. Running without debugging always seems to result in 401

+2
source

Hi, I encountered the same problem to work with the bot locally in v3. I just did everything empty in web.config and it works.

+2
source

Make sure you use HTTPS. BotFramework will not work with basic auth, so tokens are not passed to clear.

See: http://docs.botframework.com/connector/calling-api/

+1
source

Make sure you republish your bot service after registering and receiving the application ID and password. If you do not, you will get Unauthorized. These steps are 100% understandable, and I pressed it for a minute.

0
source

Source: https://habr.com/ru/post/1246169/


All Articles