CardAction button with type=invoke doesn't work in microsoft bot framework

According to this document [https://msdn.microsoft.com/en-us/microsoft-teams/botsmessages#action---invoke-new] we can use invoke in Hero card button but it giving me below error "ActionTypes does not contain a definition for invoke

Um using Microsoft.Bot.Builder 3.2.1

Can someone help me

My code in this Link

Upvotes: 1

Views: 1300

Answers (3)

The Invoke action exists, but it is reserved for internal use.

Your bot may receive an invoke activity that represents a request for it to perform a specific operation. The sender of an invoke activity typically expects the bot to acknowledge receipt via HTTP response. This activity type is reserved for internal use by the Microsoft Bot Framework.

Upvotes: 2

Rich Moe - Microsoft
Rich Moe - Microsoft

Reputation: 572

Update BotBuilder. While I'm not sure the exact release, I believe you'll want 3.5.x.

Invoke does work as documented - it sends a payload of your choice back to the bot (like postBack), but does not display anything in the chat window like imBack or postBack would do.

Note that the Activity your bot receives is of type: invoke, not message, per the documentation.

Upvotes: 1

Xeno-D
Xeno-D

Reputation: 2213

I don't think the "invoke" actions type was ever implemented. Can't find any record of it on the botbuilder github repository. Not for version 3.2.1 or newer version.

You can check it out yourself here

Upvotes: 0

Related Questions