What is Identity Verification?
Identity Verification ensures conversations between you and your Users are kept private, and that one person can't impersonate another. This is done by passing an secure identifier of your Contact/Lead/Customer.
Open Your Inbox Settings
Grab the Identity Verification Secret
Use Example Chat Code Below
Make sure to replace the “websiteToken” and the example hash value “1234567891234” in the snip-it below
(function(d,t) {
var BASE_URL="<https://app1.chatcloud.ai>";
var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src='<https://chatcloud.b-cdn.net>'+"/packs/js/sdk.js";
g.defer = true;
g.async = true;
s.parentNode.insertBefore(g,s);
g.onload=function(){
window.chatcloudSDK.run({
websiteToken: 'ABC123ABC123',
baseUrl: BASE_URL
});
window.$chatcloud.setUser("{$user.id}", {
name: "{$user.firstname} {$user.lastname}",
avatar_url: "",
email: "{$email}",
identifier_hash: "{$user.id.hash=1234567891234}”,
phone_number: "",
description: "",
country_code: "",
city: "",
company_name: "",
});
window.$chatcloud.setCustomAttributes({
crm_contact_id: "{$user.id}"
});
}
})(document,"script");
FYI: If you’re generating the “identifier_hash” from a third party app you will need to use sha256 to hash the User ID with the Hash Secret. Here is an example;
hash_hmac('sha256', $user_id, $hash_secret);