Is there any way to access the generated token value for web chat from inside the bot framework code?

♀尐吖头ヾ 提交于 2019-12-08 09:33:07

问题


According to this URL http://docs.botframework.com/connector/embed-chat-control/

We generate a token value which is used generate the iframe embed url.

I want to be able to access this token value from the corresponding bot.

If I can't access it directly, is there any way I can compute it inside the bot framework code?


回答1:


If my understanding is right, you want to check whether your bot is working via embed chat through the bot itself rather than creating a new website and embedding it there.

I've embedded the widget in the default.htm file of my project and if the project is deployed on Azure, you can test its working.

Just code like this....

    <div><iframe src="https://webchat.botframework.com/embed/MySimpleBotPlan?s=JXYDmEp8p7E.cwA.y6E.amTHXt9V7FN88DOagU7ST39iVBUKAEBcfQdaJgUbCt8">style="height: 502px; max-height: 502px;"></iframe></div>

Please find the sample code here.

The test might fail if you try the same code as I've stopped Azure services running, but you can try the sample code by deploying it on your Azure account.

This is another example which might be helpful too.

Please refer this documentation for the step by step tutorial.

Regards,

-Jyo



来源:https://stackoverflow.com/questions/38098335/is-there-any-way-to-access-the-generated-token-value-for-web-chat-from-inside-th

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!