Webchat: secure user identification (HMAC signature)

Recognize your signed-in customers: your server signs their ID and the widget links the conversation to their record.

Nov 02, 2026

Watch this step in the video · Secure user identification

In Embed Code → User identification is the channel's secret key (Show, Copy, Regenerate).

  1. On your server, compute user_hash = HMAC-SHA256(user_id, secret_key) in hexadecimal. The tab includes the example in PHP, Node.js and Python. Never put the key in the browser.
  2. On the page, call Omnifox.identify({ user_id, user_hash, email, name, phone, attributes }).
  3. The conversation is filed under that customer, linked to their record (by their user_id), even if they write from another device.

If you call the API before the widget loads, use the command queue shown in the tab. When signing out of your site, call Omnifox.logout(). Regenerate key instantly invalidates all previous signatures.

Was this helpful?

Related articles

Message us on WhatsApp