Identity verification
Show agents who your signed-in users really are, with a Verified badge.
Identity verification proves to Risely Chat that a visitor is one of your signed-in users, so nobody can type someone else's email and pretend to be them. Verified visitors show a Verified badge and their account ID in the inbox. Available on Pro and Business.
1. Create your identity secret
Go to Developers → Identity verification → Create identity secret. Store it on your server (for example as RISECHAT_IDENTITY_SECRET). Never put it in front-end code.
2. Sign the user's ID on your server
The hash is a hex HMAC-SHA256 of the user's ID, keyed with the secret:
$hash = hash_hmac('sha256', (string) $user->id, env('RISECHAT_IDENTITY_SECRET'));
// Node.js
const hash = require('crypto').createHmac('sha256', process.env.RISECHAT_IDENTITY_SECRET).update(String(user.id)).digest('hex');
3. Pass it to the widget
<script>
window.RiseChatSettings = {
widgetKey: "tv_xxxxxxxx",
user: { id: "42", email: "emily@example.com", name: "Emily Carter", hash: "<?= $hash ?>" }
};
</script>
In single-page apps call RiseChat.setUser({...}) after sign-in and RiseChat.logout() after sign-out, so the next person on that browser starts a fresh chat.
4. Require it (optional)
Once your server sends hashes everywhere, turn on Require verification. Calls to setUser without a valid hash are then rejected instead of being saved as unverified details.