Language

InvokeResponse Class

Definition

Represents the response returned from an invocation handler, typically used for Adaptive Card actions and task module operations.

public class InvokeResponse
type InvokeResponse = class
Public Class InvokeResponse
Inheritance
InvokeResponse
Derived

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.

Constructors

Name Description
InvokeResponse(Int32, Object)

Represents the response returned from an invocation handler, typically used for Adaptive Card actions and task module operations.

Properties

Name Description
Body

Gets or sets the response body.

Status

Status code of the response.

Methods

Name Description
Error(Int32, Object)

Creates an error invoke response with the specified status code and optional body.

Ok(Object)

Creates a successful (200) invoke response with the specified body.

Ok<TBody>(TBody)

Creates a successful (200) strongly-typed invoke response with the specified body.

Applies to