Is there any way to access the generated token val

2019-06-13 18:26发布

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条回答
▲ chillily
2楼-- · 2019-06-13 19:09

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

查看更多
登录 后发表回答