Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
api-webhooks [2017/01/18 14:25]
ben [Confirm the Request is Genuine]
api-webhooks [2017/07/26 08:24] (current)
Line 191: Line 191:
 </​code>​ </​code>​
  
-===== Mailig ​List Unsubscribe Webhook =====+ 
 +==== Confirm the Request is Genuine ​==== 
 +To confirm the request isn't from another system impersonating Sentori, perform the following operation. 
 + 
 +  - Concatenate the //​AccountExternalID//,​ //​EmailAddress//,​ //​MailingListExternalID//,​ //Type//, //Date// values from the request (so exclude //​Description//​ and //vhash//) and your //API Key// 
 +  - Convert the result into bytes 
 +  - Get the SHA1 hash of those bytes and remove any hyphen characters 
 + 
 +If the result matches the //vhash// value in the request, it's genuine. 
 + 
 +\\ 
 +\\ 
 + 
 +Here's the example above being checked using C# code: 
 + 
 +The API Key of this Sentori Account is "​20011111-1111-1111-1111-111111111200"​. 
 + 
 +<​code>​ 
 +string values = "​1234ABCD"​ + "​user@example.com"​ + "​ABCD1234"​ + "​subscribe"​ + "​2016-10-28T14:​59:​43.6889402Z"​ + "​20011111-1111-1111-1111-111111111200";​ 
 +byte[] bytes = System.Text.Encoding.Default.GetBytes(values);​ 
 +System.Security.Cryptography.SHA1Managed sha1 = new System.Security.Cryptography.SHA1Managed();​ 
 +string checkHash = BitConverter.ToString(sha1.ComputeHash(bytes));​ 
 +checkHash = checkHash.Replace("​-",​ string.Empty);​ 
 +// Output is "​true"​ if genuine, "​false"​ if not. 
 +Console.WriteLine("​Is genuine? " + ("​0321B442144F3EF8663EF47D738E2EDEDEBDF73F"​ == checkHash));​ 
 +</​code>​ 
 + 
 +\\ 
 +\\ 
 + 
 + 
 +===== Mailing ​List Unsubscribe Webhook =====
  
 Sentori calls this Webhook when a Contact is removed from a Mailing List, whether by a Contact performing an action (including Unsubscribing from the Account) or a User through Sentori'​s interface. Sentori calls this Webhook when a Contact is removed from a Mailing List, whether by a Contact performing an action (including Unsubscribing from the Account) or a User through Sentori'​s interface.
Line 262: Line 293:
 \\ \\
  
- 
-==== Confirm the Request is Genuine ==== 
-To confirm the request isn't from another system impersonating Sentori, perform the following operation. 
- 
-  - Concatenate the //​AccountExternalID//,​ //​EmailAddress//,​ //​MailingListExternalID//,​ //Type//, //Date// values from the request (so exclude //​Description//​ and //vhash//) and your //API Key// 
-  - Convert the result into bytes 
-  - Get the SHA1 hash of those bytes and remove any hyphen characters 
- 
-If the result matches the //vhash// value in the request, it's genuine. 
- 
-\\ 
-\\ 
- 
-Here's the example above being checked using C# code: 
- 
-The API Key of this Sentori Account is "​20011111-1111-1111-1111-111111111200"​. 
- 
-<​code>​ 
-string values = "​1234ABCD"​ + "​user@example.com"​ + "​ABCD1234"​ + "​subscribe"​ + "​2016-10-28T14:​59:​43.6889402Z"​ + "​20011111-1111-1111-1111-111111111200";​ 
-byte[] bytes = System.Text.Encoding.Default.GetBytes(values);​ 
-System.Security.Cryptography.SHA1Managed sha1 = new System.Security.Cryptography.SHA1Managed();​ 
-string checkHash = BitConverter.ToString(sha1.ComputeHash(bytes));​ 
-checkHash = checkHash.Replace("​-",​ string.Empty);​ 
-// Output is "​true"​ if genuine, "​false"​ if not. 
-Console.WriteLine("​Is genuine? " + ("​0321B442144F3EF8663EF47D738E2EDEDEBDF73F"​ == checkHash));​ 
-</​code>​ 
- 
-\\ 
-\\ 
  
 ===== Email Bounce Webhook ===== ===== Email Bounce Webhook =====
Line 378: Line 380:
 Sentori calls this Webhook when a Contact first performs certain interactions with an Email (e.g. opens the email or clicks a link) you can have Sentori pass this information on to an external system that may perform additional tasks. Sentori calls this Webhook when a Contact first performs certain interactions with an Email (e.g. opens the email or clicks a link) you can have Sentori pass this information on to an external system that may perform additional tasks.
  
-To use this featureset the Interactions Webhook on an Email by clicking the Email Tools menu button and selecting Interactions Webhook. +At present, this is limited to External Link Clicks ​only.
- +
-You'll be presented with a popup that allows you to enter a URL to the external system, as well tickboxes for each interaction that Sentori currently supports. ​ Initially ​this is limited to External Link Clicks, but further options will be added in future.+
  
-NOTE: Sentori will only call your webhook URL the first time each of your Contacts performs one of your selected interactions,​ not every time.  So (once we've implemented this for Opens) if a Contact Opens your email 5 times, it would only be called for the first Open.  Each link is considered a separate interaction so it would be called the first time a Contact clicks each link.+NOTE: Sentori will only call your webhook URL the first time each of your Contacts performs one of your selected interactions,​ not every time.  So (once we've implemented this webhook ​for Opens) if a Contact Opens your email 5 times, it would only be called for the first Open.  Each link is considered a separate interaction so it would be called the first time a Contact clicks each link in an Email.