.net - how to connect to Microsoft bot framework from mvc web application -


i created simple mvc web application sends message in json format.

which url should enter in app connects bot?

and how bot receive message , send response?

as of using bot emulator microsoft , bot app working fine.

do need publish bot app on azure???

which url should enter in app connects bot?

using webchat control easiest way bot on internet. can use following url in iframe on webpage default (after bot created, published, , configured in dev.botframework.com):

<iframe src="https://webchat.botframework.com/embed/your_bot_id?s=your_secret_here"></iframe>

note: should call https://webchat.botframework.com/api/tokens secret, , server server token, replacing s t, don't expose bot's secret. explained here: https://docs.botframework.com/en-us/support/embed-chat-control2/

and how bot receive message , send response?

messages sent , received in json format. there's quite bit of documentation , examples online. this: https://docs.botframework.com/en-us/csharp/builder/sdkreference/routing.html on sending , receiving activities

as of using bot emulator microsoft , bot app working fine.

do need publish bot app on azure???

your bot need published somewhere. azure best place host bot right because of microsoft's dedication framework , future.

there's security aspects , complexities, explained dan driscoll here https://github.com/microsoft/botbuilder/issues/1006#issuecomment-244087904:

bots web services. if unhook security , talk directly bot's activity endpoint, can operate bot locally on machine. may simpler open own api on bot's service because emulating in channels fair amount of work. (it's no means impossible -- in emulator -- there fair amount of complexity there.)

if want stay within bot framework universe, bot's endpoint need accessible bot framework services, i.e. on internet. if you're publishing on internet, want secure endpoint, , bot framework security model design not allow call bot -- our libraries allow in authentic bot framework services.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -