InvokeResponse(Int32, Object) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents the response returned from an invocation handler, typically used for Adaptive Card actions and task module operations.
public InvokeResponse(int status, object? body = default);
new Microsoft.Teams.Apps.InvokeResponse : int * obj -> Microsoft.Teams.Apps.InvokeResponse
Public Sub New (status As Integer, Optional body As Object = Nothing)
Parameters
- status
- Int32
The HTTP status code indicating the result of the invoke operation (e.g., 200 for success).
- body
- Object
Optional response payload that will be serialized and sent to the client.
Remarks
This class encapsulates the HTTP-style response sent back to Teams when handling invoke activities. Common status codes include 200 for success, 400 for bad request, and 500 for errors. The Body property contains the response payload, which is serialized to JSON and returned to the client.