Video: Build a Subscriber Lookup Link for Your Managed Preferences Form

Learn how to generate a validation hash that you can use to send to manage preferences form where they can updated their existing information.

Code Sample

<?php
// Define hmac variables and encryption
// Use values from the Manage Preferences URL to populate $siteID and $webformId
// $contactId is the email address or API ID for your contact
// $sharedSecret is set within Data Exchange
$siteId = '';
$webformId = '';
$contactId = '';
$sharedSecret = '';

// generate hmac token
$token = hash_hmac('sha256', $siteId . $webformId . $contactId, $sharedSecret);

// print hmac token
print $token;
?>