There was an error sending this message to your bot: HTTP status code Unauthorized

dialogo80 1 Reputation point
2021-04-23T10:15:27.833+00:00

hi, I just published my bot which is remotely hosted on a server and created a web chat channel but I get the following error "There was an error sending this message to your bot: HTTP status code Unauthorized, I need help, this project It is very important to me

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
926 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. GiftA-MSFT 11,176 Reputation points
    2021-04-23T16:27:11.047+00:00

    Hi, thanks for reaching out. Here are some resources that may be useful. Ensure to check the following:

    • The Messaging endpoint specified on the Settings page for your bot in the Bot Framework Portal is incorrect. Make sure you have included the proper path at the end of the URL (e.g., /api/messages).
    • The Messaging endpoint specified on the Settings page for your bot in the Bot Framework Portal does not begin with https or is not trusted by the Bot Framework. Your bot must have a valid, chain-trusted certificate.
    • The bot is configured with missing or incorrect values for app ID or password. Verify that the bot configuration settings specify valid values for app ID and password.

    Hope this helps.

    1 person found this answer helpful.

  2. Ibrahim Ford 1 Reputation point
    2021-09-14T04:50:41.373+00:00

    @dialogo80 @Sai Charan

    There are some solutions here:

    1. https://stackoverflow.com/questions/49144699/there-was-an-error-sending-this-message-to-your-bot-test-in-web-chat
    2. https://stackoverflow.com/questions/66467234/there-was-an-error-sending-this-message-to-your-bot-http-status-code-notfound
    3. https://stackoverflow.com/questions/56435491/test-in-web-chat-typing-message-returns-not-found-http-status-code-after-deplo However, if none of these have worked out. What I did was go the 'App Service' (if you used Bot Composer you might see 2 App Services -- choose the one without suffix 'qna').

    Under 'TLS/SSL settings' --> set 'HTTPS Only' to 'On'.

    This was how I fixed my issue. Hope it helped yours as well.


  3. Alok Ahirwar 1 Reputation point
    2022-12-01T06:25:57.887+00:00

    My python bot working fine on the emulator but not working on azure. I am struck since 3 days. I tried all the suggestions provided above.
    having errors : -
    "There was an error sending this message to your bot: HTTP status code Unauthorized"
    server time out
    gatewayerror
    internal server error
    on the web chat channel health status.
    suggest some ways out other than mentioned above


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.