user3740951
user3740951

Reputation: 1239

Passing cookie to and from Bot Service

I have a Bot service and a Node JS client that uses the open-source Web chat control. My requirement is that I need to store some user information(like userId) in a browser cookie and send this information to the bot service, so that when user returns to the bot he/she doesn't have to enter user information again. Is there a way to support this requirement with the Web-chat control and Bot service?

Upvotes: 1

Views: 1545

Answers (1)

Fei Han
Fei Han

Reputation: 27793

My requirement is that I need to store some user information(like userId) in a browser cookie and send this information to the bot service, so that when user returns to the bot he/she doesn't have to enter user information again.

It seems that you’d like to store user information in cookie to remember information about the user and pass user’s specific information to bot service. To store/retrieve user information in cookie, you can create/read cookies via the document.cookie property with JavaScript in client side code.

To pass user’s specific information to bot service, as Nicolas R mentioned in comment, you can send specific event activity with user information via backchannel mechanism. You can get more information about the backchannel mechanism from these articles:

Upvotes: 0

Related Questions