BotFramework-WebChat icon indicating copy to clipboard operation
BotFramework-WebChat copied to clipboard

Passing query string in iFrame and reading them in the BOT code

Open maheshksingh opened this issue 8 years ago • 2 comments

Hello,

I am passing the userId from the iFrame like below, and this iFrame is embedded on the master screen of our website.

and trying to read it from the bot code like below, which is called from the StartAsync method

userid = context.Activity.From.Id;

But I get some junk values into the userId, and when I do the F12 into the iFrame, I do see the proper userid appended to the iframe src.

Any suggestions on where I am going wrong will be highly appreciated. Thanks.

maheshksingh avatar Jan 09 '18 04:01 maheshksingh

Please try: <iframe src="https://webchat.botframework.com/embed/BotId?s=BOTSecret&userid=<%=UserId %>" height="400" ></iframe>

EricDahlvang avatar Jan 09 '18 04:01 EricDahlvang

Closing due to inactivity.

compulim avatar Jun 18 '18 21:06 compulim