BotFrameworkHttpClient class

Warning

This API is now deprecated.

Use BotFrameworkAuthentication.createBotFrameworkClient() to obtain a client and perform the operations that were accomplished through BotFrameworkHttpClient. HttpClient for calling skills from a Node.js BotBuilder V4 SDK bot.

Constructors

BotFrameworkHttpClient(ICredentialProvider, string)

Creates a new instance of the BotFrameworkHttpClient class

Methods

postActivity<T>(string, string, string, string, string, Activity)

Forwards an activity to another bot.

Constructor Details

BotFrameworkHttpClient(ICredentialProvider, string)

Creates a new instance of the BotFrameworkHttpClient class

new BotFrameworkHttpClient(credentialProvider: ICredentialProvider, channelService?: string)

Parameters

credentialProvider

ICredentialProvider

An instance of ICredentialProvider.

channelService

string

Optional. The channel service.

Method Details

postActivity<T>(string, string, string, string, string, Activity)

Forwards an activity to another bot.

function postActivity<T>(fromBotId: string, toBotId: string, toUrl: string, serviceUrl: string, conversationId: string, activity: Activity): Promise<InvokeResponse<T>>

Parameters

fromBotId

string

The MicrosoftAppId of the bot sending the activity.

toBotId

string

The MicrosoftAppId of the bot receiving the activity.

toUrl

string

The URL of the bot receiving the activity.

serviceUrl

string

The callback Url for the skill host.

conversationId

string

A conversation ID to use for the conversation with the skill.

activity

Activity

Activity to forward.

Returns

Promise<InvokeResponse<T>>

A promise representing the asynchronous operation.