Forum Discussion

Ibrahim151's avatar
Ibrahim151
Copper Contributor
Feb 22, 2024

Failed to send message from BOT framework composer published on teams.

I have created one Chatbot using Bot Framework Composer v2.1 .Also Implemented OAuth Authentication mechanism so it will ask for login on startup and it is working as expected. I published this bot on Teams. There is a separate azure function running in background for processing. on completion of azure function, I want to send the message to bot that processing is completed. But not able to send messages in Teams. I just wanted to check if there is any provision to send the message to the bot with some URL like directline etc.

Even i tried with below service line url which is mentioned in the document here .

below are the input used in sending activity message.

URL:https://smba.trafficmanager.net/amer/v3/conversations/<conversation-id>/activities

token: OAuth token which we received during login.

 

 

 

var message = new
{
    type = "message",
    from = new { id = "Agent" },
    conversation = new { id = conversationId },
    text = "Posted this message from azure function",
    suggestedActions = new
    {
        actions = new[]
        {
            new { type = "imBack", title = "Action 1", value = "action1" },
            new { type = "imBack", title = "Action 2", value = "action2" },
            new { type = "imBack", title = "Action 3", value = "action3" }
        }

    }
};

 

 

 

Resources