Skip to main content

Set up Identity Verification for web and mobile [Deprecated]

Enhance your security and prevent impersonation by setting up Identity Verification.

Written by Brian Mongey

⚠️ Identity Verification is now deprecated.

Identity Verification is still supported and will continue to work but if you are considering installing it or making changes, we strongly recommend you to migrate to using JSON Web Tokens to secure your Messenger instead.


Set up Identity Verification on web

Select your installation method

First go to Settings > Channels > Messenger > Install and open Secure the messenger with Identity Verification.

Then choose how you installed your Messenger (with an NPM package or with an integration).

If you’ve installed Intercom with WordPress or Shopify, you can go ahead and enforce Identity Verification with no configuration needed (only available for US hosted workspaces).

Generate an HMAC code on your server

For Code snippet installations, you'll need to generate an HMAC on your server for each logged-in user and send it to Intercom.

First, choose how you want to uniquely identify your users: via User ID or Email.

Note:

  • If you choose to send both to Intercom, the User ID will take preference.

  • Keep your secret key safe! Never commit it directly to your repository, client-side code, or anywhere a third party can find it.

Then choose the server-side language or framework you're using to get your code to generate an HMAC for your app.

Update your site to send the HMAC

Everywhere you load user data and have a window.intercomSettings code snippet, add a new attribute called user_hash and assign the HMAC code to it.

We offer an updated code snippet which includes HMAC value as a parameter sent to the Intercom Messenger. Simply click Copy code to use it.

Check the installation

Once you’ve set up Identity Verification and started sending user_hashes for each user, check the installation is working as expected.

Click on Check the installation. This button will display a table of the domains where the Messenger has been found, as well as their Identity Verification status. A green tick indicates success, and a warning triangle indicates that the Messenger was not found with the correct Identity Verification settings.

Ensure that you have dealt with all errors on all the domains in the list. These are all the domains from which we have received a ping.

You can also use our hash checker to verify that the user hash values you're sending over to Intercom are correct, ensuring that Identity Verification will work correctly. Here, you can verify what the expected user hash is based on: user_id or email (if you're not using user_id's).

All of your ping requests must include user_hash for you to enforce Identity Verification on web.

Enforce Identity Verification for Messenger

If you’ve correctly modified your Messenger code and see no errors, you can now enforce Identity Verification by toggling on the option "Enforce Identity Verification for messenger" and clicking Enforce Identity Verification for messenger. This may take 5-10 seconds to activate.

Once enforced, any requests without user hashes will be rejected, preventing impersonation of your users via the Messenger.


Set up Identity Verification on your mobile app

Similarly to the Web installation, you'll find the toggle for iOS, Android & React Native under Install for mobile:

Then retrieve the Identity Verification secret key and store it in a secure place on your server.

You should not store the secret key in your mobile app; your server should only send the user_hash to your mobile app.

Now follow our mobile SDK guides for the platform you’re using:

Test your Messenger in your app before you enforce Identity Verification. Once you have tested that your Messenger is working as expected, publish the new Identity Verification-enabled version on the App Store. When you reach a high level of adoption, enforce Identity Verification, which will then start enforcing it for all versions of your app.

Enabling Identity Verification will stop old versions of your app communicating with Intercom if they don’t send a valid user_hash.


Identity Verification can't be turned off once it's enforced

Once you enforce Identity Verification, you can't turn it off. This applies to web, iOS, and Android. Test your setup on each platform before you enforce it.

Important: This can't be undone. Once Messenger security is enforced, you won't be able to turn it off.


How to rotate your Identity Verification secret

You can rotate your identity verification secrets from your workspace. To perform this rotation, do the following:

  1. Create a new secret for the needed channel (Web, Android or iOS or one key for all the platforms).

2. Then, implement the new secret into your code to generate the proper user_hashes.

3. Deactivate the old secret and activate the new one.

4. Refresh the page to view the new secret.

5. When you make sure everything works as expected, delete the old secret.

There will be no downtime during this process.

Find out more about Identity Verification or try our troubleshooting tips if you're experiencing issues with setup.


Note: Identity Verification has been deprecated in favour of an improved feature using JSON web tokens (JWTs)

See more here:


💡Tip

Need more help? Get support from our Community Forum
Find answers and get help from Intercom Support and Community Experts


Did this answer your question?