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

Need access to conversation id of webchat bot

Open vaditya04 opened this issue 10 years ago • 7 comments

I've embedded the chat bot into my webpage using the iframe method detailed in http://docs.botframework.com/connector/embed-chat-control/#navtitle

I want to get access to the conversation id of the web chat so I can programmatically send the bot messages without user involvement.

My idea is to start off the web chat using a POST request to /api/conversations and get a conversation id and token, start the iframe using the token, and programmatically message the bot using the conversation id.

Would this work? Is it supported? Is there a better way? Thanks!

vaditya04 avatar Jun 15 '16 06:06 vaditya04

@tomlm Hi - any insights on this?

vaditya04 avatar Jun 24 '16 13:06 vaditya04

You should use the Direct Line API. Web Chat and Direct Line share a service and are currently able to cross conversations, but the conversation-crossing ability will go away soon and the protocols may diverge eventually (although no current plans to do that -- just no guarantees they'll stay the same).

If you use the Direct Line side, you keep complete control over your conversations, and you can use access that conversation from more than one place as long as you a) know the conversation ID, and b) have a secret or token that grants you access to that conversation.

dandriscoll avatar Jun 26 '16 23:06 dandriscoll

@dandriscoll Is there a chat box interface that comes along with the Direct Line API? I would prefer not to write my own UI. The web chat was convenient because I could embed it, it was ready out of the box.

vaditya04 avatar Jun 29 '16 09:06 vaditya04

@vaditya04 you find some chat box interface for the Direct Line AP? Thanks

Lipa9963 avatar Jan 09 '17 16:01 Lipa9963

Hi @Lipa9963 and @vaditya04, the new Bot Framework Web Chat control is now open-source and forkable if you want deeper access to the API. https://github.com/Microsoft/BotFramework-WebChat

dandriscoll avatar Jan 10 '17 05:01 dandriscoll

Hi, you can find it too for C# web app ?

Thanks!

On Tue, Jan 10, 2017 at 7:02 AM, dandriscoll [email protected] wrote:

Hi @Lipa9963 https://github.com/Lipa9963 and @vaditya04 https://github.com/vaditya04, the new Bot Framework Web Chat control is now open-source and forkable if you want deeper access to the API. https://github.com/Microsoft/BotFramework-WebChat

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Microsoft/BotBuilder/issues/484#issuecomment-271487270, or mute the thread https://github.com/notifications/unsubscribe-auth/AWFzXcnWGa2zm4GqRD9HJcIvUX7pfZCGks5rQxDSgaJpZM4I2Bp2 .

Lipa9963 avatar Jan 10 '17 17:01 Lipa9963

Hi @Lipa9963, the chat control is JavaScript and is run in the client browser. You can serve the page from a website coded in C#.

dandriscoll avatar Jan 10 '17 18:01 dandriscoll