0

I have integrated a ms bot framework webchat(node js) in to a web page. I am passing the logged in user information by using iframe.

Eg: Like below

<iframe id="myFrame" src='https://webchat.botframework.com/embed/
testbot?s=secret_code&username=admin&userid=1234'></iframe>

Could anyone guide me, how can I read these parameter values from bot.

Thanks in advance.

Maadi
  • 1
  • 1
  • Hi @Maadi! Welcome to SO. I don't think what will work, though I could be wrong. But you try embedding the bot using Javascript. That gives you control to send data with a specific user id. Not sure about the username though. – Master Chief Oct 24 '18 at 04:14

1 Answers1

0

If you provide a username and userid in the iframe's query parameters, then the activity's .From property will have those values:

<iframe style="width:300px;height:400px;" src='https://webchat.botframework.com/embed/mybotid?s=mybotsecret&username=adminxxx&userid=1234'></iframe>

enter image description here

Eric Dahlvang
  • 8,252
  • 4
  • 29
  • 50