webhookGet
public static array webhookGet(string token, string listID)
Get the list of webhook using the listID of the contact list.
Section
Webhook Related Methods

Parameters
string tokenA valid token for your account. To generate a token, use the login method.
string listIDThe contact list ID to whom this webhook is to be add. You can get the contact lists from listGet

Returns
arrayReturns an array with the results.

Return Structure
integer sequenceThe sequence number of the record
string idThe ID of the webhook.
string urlURL (Uniform resource locator) of the webhook
string subscribesTRUE or FALSE 'Subscribes' update Type of Webhook.
string unsubscribesTRUE or FALSE 'Unsubscribes' update Type of Webhook.
integer profile_updatesTRUE or FALSE 'Profile Updates' update Type of Webhook.
string email_changedTRUE or FALSE 'Email Changed' update Type of Webhook.
string cleaned_addressTRUE or FALSE 'Cleaned Address' update Type of Webhook.'
string createdDateThe date on which the webhook was created
string modifiedDateThe date on which the webhook was last updated


Examples
download example code
xmlrpc_webhookGet.php


  1. <?php
  2. /**
  3. This Example shows how to authenticate a user using XML-RPC.
  4. Note that we are using the PEAR XML-RPC client and recommend others do as well.
  5. **/
  6. require_once 'XML/RPC2/Client.php';
  7. require_once 'inc/config.php';
  8. $client = XML_RPC2_Client::create($apiURL);
  9. $token = $client->login($apiLogin, $apiPassword);
  10.  
  11. /**
  12. Fetch the latest contact list ID, so we can retrieve the target contact list ID.
  13. **/
  14. $contactList = $client->listGet($token, "", 1, 1, "", "");
  15. $listID = $contactList[0]['id'];
  16.  
  17. $webhookLists = $client->webhookGet($token,$listID);
  18.  
  19. foreach($webhookLists as $rec) {
  20.     echo $rec['sequence'] . "] URL: " . $rec['url'] . "(" . $rec['id'] . ")";
  21.     echo "\t Subscribes:" . $rec['subscribes'] ;
  22.     echo "\t Unsubscribes:" . $rec['unsubscribes'] ;
  23.     echo "\t Profile Updates:" . $rec['profile_updates'] ;
  24.     echo "\t Email Changed:" . $rec['email_changed'] ;
  25.     echo "\t Cleaned Address:" . $rec['cleaned_address'] ;
  26.     echo "\t Created Date: " . $rec['createdDate'] ;
  27.     echo "\t Updated Date: " . $rec['modifiedDate'];
  28.     echo "<br />";
  29. }
  30.  
  31. ?>