Identity validation in Chatwoot

To make sure the conversations between the customers and the support agents are private and to disallow impersonation, you can setup identity validation Chatwoot.

Identity validation can be enabled by generating an HMAC. The key used to generate HMAC for each webwidget is different and can be copied from Inboxes -> Settings -> Configuration -> Identity Validation -> Copy the token shown there

You can generate HMAC in different languages as shown below.


$key = 'webwidget.hmac_token';
$message = 'identifier';

$identifier_hash = hash_hmac('sha256', $message, $key);
const crypto = require('crypto');

const key = 'webwidget.hmac_token';
const message = 'identifier';

const hash = crypto.createHmac('sha256', key).update(message);

require 'openssl'
require 'base64'

key = 'webwidget.hmac_token'
message = 'identifier'

OpenSSL::HMAC.hexdigest('sha256', key, message)
key = 'webwidget.hmac_token'
message = 'identifier'

signature = :crypto.hmac(:sha256, key, message)

Base.encode16(signature, case: :lower)
package main

import (

func main() {
  secret := []byte("webwidget.hmac_token")
  message := []byte("identifier")

  hash := hmac.New(sha256.New, secret)
import hashlib
import hmac
import base64

message = bytes('webwidget.hmac_token', 'utf-8')
secret = bytes('identifier', 'utf-8')

hash =, message, hashlib.sha256)