Skip to main content
Add the chat first (install guide), then tell it who is signed in. Call Frictionless.reset() when they sign out.

Computing userHash

userHash is the HMAC-SHA256 of the user ID, keyed with your identity secret, as lowercase hex. Compute it on your server when you render the page, so nobody can pretend to be another user by editing it.

What agents can trust

  • identify() accepts a name and email but not a phone number. Send phone numbers from your server, so a visitor can’t attach themselves to someone else’s WhatsApp chat.
  • track() and setContext() run in the visitor’s browser, where anyone can change them, so agents see them marked “not verified”. Send anything agents must rely on, such as balances or payment outcomes, from your server.