Manushanka Senanayake
Manushanka Senanayake

Reputation: 71

proactive message sending in MS Teams Bot not working

I created a Bot and added to Skype and Microsoft Teams. Both are responding fine for user messages (reply to user messages).

Following the documentation, I tried to send (ad-hock) proactive messages to users. This worked with Skype but it not with Microsoft Teams. It also did not provide any error messages.

Do I have to adjust any settings in Microsoft Teams or Office 365 in order to send proactive messages? Or is there any other specific way to send proactive messages for Microsoft Teams?

Upvotes: 1

Views: 1164

Answers (2)

Manushanka Senanayake
Manushanka Senanayake

Reputation: 71

Figured out what was the error. Following code line should be added before calling SendToConversationAsync, CreateConversationAsync etc..

MicrosoftAppCredentials.TrustServiceUrl(ServiceUrl);

And I tested this for documentation and sample source. Both are working fine.

Upvotes: 2

Bill Bliss - MSFT
Bill Bliss - MSFT

Reputation: 3581

The documentation for this is found in this article: Starting a 1:1 conversation. There's also some sample source although it's part of a larger project.

See if that helps.

Upvotes: 1

Related Questions