botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Connector to other channels - apart from the standard channels - No DirectLineAPI

Open Vkrish-Nimmagadda opened this issue 10 years ago • 14 comments

We are trying to integrate BotConnector with our custom Chat platform. For which I guess we need to implement IConnectorClient. However, when I look at ConnnectorClient class it seems to be a Partial class and the actual methods are implemented elsewhere which is not part of the published source code.

What is the mechanism to implement my own Connector for my Channel ? It is very crucial for us to move forward. I want my Product to use all the Bots that are built using Microsoft Bot Framework. I want to build a Custom channel/connector.

I don't want to use DirectLine API.

Thank you in advance for your time. #1187

Vkrish-Nimmagadda avatar Sep 12 '16 15:09 Vkrish-Nimmagadda

Right now we're not enabling third parties to create their own custom channels for the Bot Framework. It's an open request for the future, but we're not there right now.

Your best bet would be to consider the Direct Line channel which gives you an API you can talk to from within your own custom app, channel or other.

jameslew avatar Sep 12 '16 15:09 jameslew

So with DirectLineAPI will I be able to render the Attachments compatible with my Platform. I don't mind doing some custom coding here.

Vkrish-Nimmagadda avatar Sep 12 '16 15:09 Vkrish-Nimmagadda

You'll have access to the attachment objects to render them as part of the message; you can read more about the DirectLine API here: https://docs.botframework.com/en-us/restapi/directline/#navtitle

jameslew avatar Sep 12 '16 16:09 jameslew

The current version of Direct Line requires you to put your attachments in the ChannelData field but we're upgrading the protocol for the next release so this won't be necessary.

dandriscoll avatar Sep 12 '16 16:09 dandriscoll

@dandriscoll, thank you much, now I get the issue.
@jameslew That's seems rather unpleasant, may be I am not able to place the reasons. I have been under the impression that the whole code is open source. May I know why some code is hidden. Also, it would help if you could throw some light on the the trade offs between using DirectlineAPI and using Custom Channel connector (had it been exposed).

Vkrish-Nimmagadda avatar Sep 12 '16 17:09 Vkrish-Nimmagadda

@Kris-Nimmagadda I'm not sure I understand the "unpleasant" part. What code are you referring to being hidden?

The biggest tradeoffs would be that adding a channel adds the configuration UI, etc. so other bot developers can consume the channel. Otherwise there isn't a tangible difference.

jameslew avatar Sep 12 '16 19:09 jameslew

Thank you for your quick response, when I said hidden code, I am referring to the full implementation of IConnectorClient which actually seems to be not part of the source code here on Git. With lot of good work from you all, slowly the community is realising that Microsoft is not creating dependencies and lock-ins. It's just that some part of the code responsible for running my Bot is not in my control and I am dependent on Microsoft. Just wondering how many folks are comfortable with this idea. Please don't misunderstand, I have been an MSFT for a long time and I and no anti-MS. Just putting my thoughts and there is a bright chance that I might be missing a point. Thank you much for your help with the DorectlineAPI trade-offs. You guys are doing amazing work and it's undeniable !!

Vkrish-Nimmagadda avatar Sep 12 '16 19:09 Vkrish-Nimmagadda

Hi @Kris-Nimmagadda, the implementation of IConnectorClient is available at https://github.com/Microsoft/BotBuilder/blob/master/CSharp/Library/Microsoft.Bot.Connector/ConnectorAPI/ConnectorClient.cs.

The problem with registering a channel is not one of source, it's an issue of security, as we can't allow a malicious developer to impersonate an existing Bot Framework channel.

To allow developers to communicate with their own bot (or other bots that they have been granted access to), we built the Direct Line API. That channel is designed to solve this problem.

dandriscoll avatar Sep 12 '16 22:09 dandriscoll

Gosh ! I seriously misunderstood the scenario. Sincere apologies @jameslew , there is nothing unpleasant about this. I somehow was thinking some of the IConnectorClient was not fully implemented and hence it was marked as partial class, missed out and that is why my initial question was that. Thank you much for the clarifications and your immediate help @dandriscoll and @jameslew . Appreciate it. I will try DirectLine API.

Vkrish-Nimmagadda avatar Sep 13 '16 08:09 Vkrish-Nimmagadda

Thanks! I'm assuming this is closed then.

jameslew avatar Sep 13 '16 19:09 jameslew

Updating the link to the IConnectorClient, which is now located at: https://github.com/Microsoft/BotBuilder/blob/master/CSharp/Library/Microsoft.Bot.Connector.Shared/ConnectorAPI/ConnectorClient.cs

PaulStubbs avatar Apr 09 '17 08:04 PaulStubbs

Hi, I wish to authenticate my bot , as a user signs in my website, without explicitly asking them to enter username and password in the bot

Please suggest an approach , to achieve this

Thanks

May be its not the correct platform to ask, but I am not getting a solution or approach .

cruise-insights avatar Apr 14 '17 07:04 cruise-insights

@cruise-insights this is not the correct ticket to ask that question

microsoftly avatar Aug 30 '17 04:08 microsoftly

will this do? https://www.npmjs.com/package/offline-directline

ghost avatar Jul 16 '18 07:07 ghost