Why am I getting a 502 while trying to test a bot in Test in Web Chat?

Norbert Annus 1 Reputation point
2021-04-12T17:38:58.37+00:00

I'm trying to create a bot to get started with policy based recording for Teams but no matter what guide I follow I'm always getting back a 502 (for the activities endpoint) when trying to test my bot in Test in Web Chat.

These are the guides I've tried so far:
https://learn.microsoft.com/en-us/azure/bot-service/bot-service-quickstart-registration?view=azure-bot-service-4.0
https://learn.microsoft.com/en-us/azure/bot-service/abs-quickstart?view=azure-bot-service-4.0
https://learn.microsoft.com/en-us/azure/bot-service/javascript/bot-builder-javascript-quickstart?view=azure-bot-service-4.0

This is the endpoint which is causing me headaches:
https://webchat.botframework.com/v3/directline/conversations/{conversationId}/activities

And this is the error I end up with:

{  
  "error": {  
    "code": "BotError",  
    "message": "Failed to send activity: bot returned an error"  
  },  
  "httpStatusCode": 500  
}  

Can you please advise?

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

1 answer

Sort by: Most helpful
  1. GiftA-MSFT 11,146 Reputation points
    2021-04-21T19:24:52.673+00:00

    Here are some resources that may be useful:

    • 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.

    You can also try creating a new web app bot and test the bot for a response.