Language

ConversationClient.SendConversationHistoryAsync Method

Definition

Uploads and sends historic activities to the conversation.

public virtual System.Threading.Tasks.Task<Microsoft.Teams.Core.SendConversationHistoryResponse> SendConversationHistoryAsync(string conversationId, Microsoft.Teams.Core.Transcript transcript, Uri serviceUrl, Microsoft.Teams.Core.Http.BotRequestContext? requestContext = default, System.Collections.Generic.Dictionary<string,string>? customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SendConversationHistoryAsync : string * Microsoft.Teams.Core.Transcript * Uri * Microsoft.Teams.Core.Http.BotRequestContext * System.Collections.Generic.Dictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Teams.Core.SendConversationHistoryResponse>
override this.SendConversationHistoryAsync : string * Microsoft.Teams.Core.Transcript * Uri * Microsoft.Teams.Core.Http.BotRequestContext * System.Collections.Generic.Dictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Teams.Core.SendConversationHistoryResponse>
Public Overridable Function SendConversationHistoryAsync (conversationId As String, transcript As Transcript, serviceUrl As Uri, Optional requestContext As BotRequestContext = Nothing, Optional customHeaders As Dictionary(Of String, String) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of SendConversationHistoryResponse)

Parameters

conversationId
String

The ID of the conversation. Cannot be null or whitespace.

transcript
Transcript

The transcript containing the historic activities. Cannot be null.

serviceUrl
Uri

The service URL for the conversation. Cannot be null.

requestContext
BotRequestContext

Optional per-request properties (see BotRequestContext) to stamp onto the request's options.

customHeaders
Dictionary<String,String>

Optional custom headers to include in the request.

cancellationToken
CancellationToken

A cancellation token that can be used to cancel the operation.

Returns

A task that represents the asynchronous operation. The task result contains the response with a resource ID.

Exceptions

Thrown if the history could not be sent successfully.

Remarks

Activities in the transcript must have unique IDs and appropriate timestamps for proper rendering.

Applies to