Language

ApiClient.ForActivity(CoreActivity) Method

Definition

Creates a new ApiClient scoped to an inbound activity, binding both the service URL and the agentic identity (from the activity's Recipient) in one call.

public virtual Microsoft.Teams.Apps.Clients.ApiClient ForActivity(Microsoft.Teams.Core.Schema.CoreActivity activity);
abstract member ForActivity : Microsoft.Teams.Core.Schema.CoreActivity -> Microsoft.Teams.Apps.Clients.ApiClient
override this.ForActivity : Microsoft.Teams.Core.Schema.CoreActivity -> Microsoft.Teams.Apps.Clients.ApiClient
Public Overridable Function ForActivity (activity As CoreActivity) As ApiClient

Parameters

activity
CoreActivity

The inbound activity to derive routing and identity from.

Returns

A new ApiClient bound to the activity's service URL and agentic identity.

Exceptions

Thrown when the activity has no service URL.

Applies to