1
votes

Is it possible to call my bot webservice, witch is hosted locally and public visible on the web, from a another .net application using the directline api but without having to route the message through the Microsoft Bot Connector ?

I mean, instead of the client app have to post an http message to

https://directline.botframework.com/v3/directline/conversations/{conversationId}/activities

make the request directly to

https://{mydomain}/v3/directline/conversations/{conversationId}/activities

Follows a diagram to help to understand what I'm trying to do:

enter image description here

1

1 Answers

0
votes

There is an example of how to call a bot directly using the 'test' channel in the blog post: https://blog.botframework.com/2017/06/19/load-testing-a-bot/

The Bot Framework currently supports the following channels:

public sealed class ChannelIds
    {
        public const string Facebook = "facebook";
        public const string Skype = "skype";
        public const string Msteams = "msteams";
        public const string Telegram = "telegram";
        public const string Kik = "kik";
        public const string Email = "email";
        public const string Slack = "slack";
        public const string Groupme = "groupme";
        public const string Sms = "sms";
        public const string Emulator = "emulator";
        public const string Directline = "directline";
        public const string Webchat = "webchat";
        public const string Console = "console";
        public const string Cortana = "cortana";
    }

reference: https://github.com/Microsoft/BotBuilder/blob/605eeceb36c01771d7146b39a6ec8b2184ad41a6/CSharp/Library/Microsoft.Bot.Builder/ConnectorEx/IChannelCapability.cs#L39

If you aren't using one of the channels provided by the Bot Framework, you'll need to implement your own authentication scheme, and override the auth validation within the bot builder sdk.

See:

https://github.com/Microsoft/BotBuilder/blob/b102e096ad0b3bb65cde51acc3bce11037375c6e/CSharp/Library/Microsoft.Bot.Connector.NetFramework/BotAuthentication.cs