Bappa Sarkar
Bappa Sarkar

Reputation: 21

Unauthorized Error Bot framework

I have developed a bot using the Microsoft Bot Framework in C#, and am in the process of trying to deploy it to a webserver instead of Azure. The web server runs Windows Server 2012 R2 and has IIS 8.5 installed. The bot works fine locally and can be tested there using the emulator without any problems.

I have configured a site in IIS on the web server for the bot and deployed the bot code there, as well as configured the app ID and password. When using the "test connection" facility on the Bot Framework site, I am given an "Unauthorized" message.

Can anybody advise on where I may be going wrong, or share their experiences with debugging these kinds of errors? Bot Framework does not seem to provide a terribly good debugging experience, unfortunately.

https://chatbot.xxxxxxxxinsight.com/

Upvotes: 2

Views: 1129

Answers (2)

Jijo Nair
Jijo Nair

Reputation: 838

If you are still getting Unauthorized error message you should check the follwing

  1. Microsoft App Id and Microsoft App Password in appsettings.json file in your project folder. (appsettings.json refers to .NET Core Bot Framework Development)
  2. Check the channels inside your Azure Bot (in Azure Portal), and check the allowed channels.

This should get your bot in running state. Make sure to pass App ID and Password with the URL in Emulator to connect to your bot.

If you are missing your Microsoft App Password, please comment below.

Upvotes: 0

Lars
Lars

Reputation: 10573

These are the common issues that users run into:

  1. Your bot’s cloud endpoint URL is not correct. Make sure you have included the path at the end of the URL (e.g. /api/messages).
  2. Your bot’s endpoint is not HTTPS or is not trusted by the Bot Framework Channel Emulator. Your bot must have a valid, chain-trusted certificate.
  3. The bot is configured without a Microsoft App Id or a Microsoft App Password.
  4. Your Microsoft App Id or Microsoft App Password are incorrect.

See the full auth troubleshooting guide here.

Upvotes: 2

Related Questions