SkillHttpClient class

A BotFrameworkHttpClient specialized for Skills that encapsulates Conversation ID generation.

Extends

Constructors

SkillHttpClient(ICredentialProvider, SkillConversationIdFactoryBase, string)

Methods

postActivity(string, string, string, string, string, Activity)

Forwards an activity to a another bot.

postActivity(string, string, string, string, string, Activity)
postToSkill(string, BotFrameworkSkill, string, Activity)

Uses the SkillConversationIdFactory to create or retrieve a Skill Conversation Id, and sends the activity.

postToSkill(string, string, BotFrameworkSkill, string, Activity)

Uses the SkillConversationIdFactory to create or retrieve a Skill Conversation Id, and sends the activity.

Constructor Details

SkillHttpClient(ICredentialProvider, SkillConversationIdFactoryBase, string)

new SkillHttpClient(credentialProvider: ICredentialProvider, conversationIdFactory: SkillConversationIdFactoryBase, channelService?: string)

Parameters

credentialProvider
ICredentialProvider
conversationIdFactory
SkillConversationIdFactoryBase
channelService
string

Method Details

postActivity(string, string, string, string, string, Activity)

Forwards an activity to a another bot.

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

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>>

postActivity(string, string, string, string, string, Activity)

function postActivity(fromBotId: string, toBotId: string, toUrl: string, serviceUrl: string, conversationId: string, activity: Activity)

Parameters

fromBotId
string
toBotId
string
toUrl
string
serviceUrl
string
conversationId
string
activity
Activity

Returns

Promise<InvokeResponse>

postToSkill(string, BotFrameworkSkill, string, Activity)

Uses the SkillConversationIdFactory to create or retrieve a Skill Conversation Id, and sends the activity.

function postToSkill(fromBotId: string, toSkill: BotFrameworkSkill, callbackUrl: string, activity: Activity)

Parameters

fromBotId
string

The MicrosoftAppId of the bot sending the activity.

toSkill
BotFrameworkSkill

The skill to create the Conversation Id for.

callbackUrl
string

The callback Url for the skill host.

activity
Activity

The activity to send.

Returns

Promise<InvokeResponse>

postToSkill(string, string, BotFrameworkSkill, string, Activity)

Uses the SkillConversationIdFactory to create or retrieve a Skill Conversation Id, and sends the activity.

function postToSkill<T>(originatingAudience: string, fromBotId: string, toSkill: BotFrameworkSkill, callbackUrl: string, activity: Activity)

Parameters

originatingAudience
string

The OAuth audience scope, used during token retrieval. (Either https://api.botframework.com or bot app id.)

fromBotId
string

The MicrosoftAppId of the bot sending the activity.

toSkill
BotFrameworkSkill

The skill to create the Conversation Id for.

callbackUrl
string

The callback Url for the skill host.

activity
Activity

The activity to send.

Returns

Promise<InvokeResponse<T>>