[英]Is there any way to access the generated token value for web chat from inside the bot framework code?
According to this URL http://docs.botframework.com/connector/embed-chat-control/ 根据此URL http://docs.botframework.com/connector/embed-chat-control/
We generate a token value which is used generate the iframe embed url. 我们生成一个令牌值,该令牌值用于生成iframe嵌入网址。
I want to be able to access this token value from the corresponding bot. 我希望能够从相应的bot访问此令牌值。
If I can't access it directly, is there any way I can compute it inside the bot framework code? 如果我不能直接访问它,是否可以在bot框架代码中进行任何计算?
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. 我已将小部件嵌入项目的default.htm文件中,如果该项目已部署在Azure上,则可以测试其工作情况。
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. 如果您尝试使用与我已停止运行Azure服务相同的代码,则测试可能会失败,但是您可以通过将示例代码部署在Azure帐户上来尝试该示例代码。
This is another example which might be helpful too. 这是另一个示例 ,可能也会有所帮助。
Please refer this documentation for the step by step tutorial . 请参阅本文档以获取分步教程 。
Regards, 问候,
-Jyo -乔
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.