send JSON data to Azure Webchat from django

Bay Leaf Digital 1 Reputation point
2022-08-11T06:02:33.103+00:00

Hi, I want to make a post call to Azure webchat from Django python code with a JSON payload. Is this something possible? If yes please guide me to the appropriate source and methods. Thanks!

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
837 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,857 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,804 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Steven Kanberg 86 Reputation points
    2022-10-25T23:15:04.67+00:00

    @Bay Leaf Digital , I'm a little late to seeing your question, but you have two options for achieving this.

    One, you can set up an endpoint (or use some other means) that would allow you to issue an event to the hosting page that includes the JSON data. When the page receives the event you use Web Chat's store to dispatch a message to Web Chat that includes the data. There is a sample, located here, that details the opposite of this (Web Chat activity spawns event on the page). It's the same concept except that you are reversing the process.

    Two, you can set up an endpoint in your bot to be used for receiving proactive messages. In this scenario, you send a POST request to the endpoint which then allows the bot to ingest the incoming data. In doing so, it becomes part of the conversation and then would be displayed via Web Chat.

    Both options are relatively simple to set up, though the second entails less to do, overall. You just need to decide which method you favor.

    0 comments No comments

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.