Skip to main content

Webhooks

Overview

Webhooks enable one application to provide another application with real-time information. A webhook delivers data to other applications as it happens, meaning you get data immediately.

Within ActiveCampaign webhooks can be used in two ways as an Automatic Webhook and as an Automation Webhook.

See Integrating With ActiveCampaign for a detailed explanation.

For specific details regarding Automatic Webhooks see Automatic Webhooks.

Automation Webhooks

Configuring An Automation Webhook

The configuration of Automation Webhooks for ActiveCampaign can be found in the following article:

The webhook URL used would be as detailed in Webhook Modules

Testing An Automation Webhook

The primary purpose of testing the webhook is to determine that any HTTP POST sent by the webhook from ActiveCampaign is successfully received by WordPress/ActiveMember360.

The process for testing is as follows:

  1. Within WordPress enable the ActiveMember360 API/Webhook logging as detailed at ActiveMember360, Settings, Logging.

  2. Within ActiveCampaign create a test automation with no start trigger and a single action set using Conditions and Workflow, Webhook with the URL to post to set as described here Contact Push.

  3. Within ActiveCamapign add your test contact to that automation from within the specific contact listing using Automations, Add

  4. Within WordPress navigate to ActiveMember360, Utilities, API/Webhook Log.

  5. Interrogate the log for a recent entry with the method mbr/contact/push. If an entry is present the HTTP POST for the webhook was received successfully by ActiveMember360 and all is working correctly.

    Standard webhook listing in ActiveCampaign
    API log listing for ActiveMember360 webhook modules

    For a fuller understanding of the log please refer to ActiveMember360, Utilities, API/Webhook Log

    Please note the HTTP POST may take a short time to arrive within WordPress, but is typically almost instantaneous.

Troubleshooting An Automation Webhook

If testing of the automation webhook is not successful it is most likely that your server/website security is such that a plugin, service or firewall on the server is blocking the HTTP POSTs.

  1. Firstly check your server logs to determine where the issue possibly lies.

    You should see entries of the form shown below:

    Server log for HTTP POSTs
    Server log for HTTP POSTs

    Where the identifier:

    A. Is the ActiveCampaign IP address from which it was sent. These should be on your whitelist.

    B. Is the date/time sent.

    C. Indicates the entry is for an HTTP POST.

    D. Is the URL segment and parameters for the webhook without the root URL.

    E. Should be 200 and indicates the HTTP POST was successfully received.

    If these entries are missing or a different number from 200 is shown there is an issue.

  2. Set any security service/plugin or firewall to allow HTTP POSTs from the following wildcards:

    https://yoursite.com/?mbr*

    https://yoursite.com/mbr/*

    i.e with any URL parameters whose first three characters are mbr followed by any other characters.

    Obviously replace https://yoursite.com with your WordPress site URL as shown in WordPress, Settings, General, Site URL.

  3. Set any security service/plugin or firewall to allow HTTP POSTs with blank user agents.

  4. Set any security service/plugin or firewall to whitelist the ActiveCampaign IP addresses:

    173.193.9.0/24
    173.193.9.198
    23.20.225.34
    34.192.144.26
    34.199.37.208
    34.230.175.182
    34.233.54.78
    34.233.145.248
    34.233.239.23
    35.169.241.145
    44.209.1.85
    44.206.115.225
    52.7.228.32
    52.45.6.233
    52.45.183.46
    52.55.227.5
    52.72.254.82
    52.86.138.218

    This is not a definitive list as ActiveCampaign do not publish the IPs they use. So there may well be others to whitelist but if they are being blocked they can be determined from your security service/plugin or firewall.

  5. Having done the above test again. If you are still having issues please submit a support ticket for us to assist here.

Using Automation Webhooks in preference to Automatic Webhooks

If you wish to use Automation Webhooks in preference to Automatic Webhooks because of the considerations when using Automatic Webhooks firstly you should deactivate Automatic Webhooks.

Then if either of the following are required use a Webhook URL set within an automation:

  • Generate a password
  • Ensure contact data is current for a logged in user where it may have been manually changed within ActiveCampaign, or changed by a third party application, or changed by actions in an automation

To generate a password you would use the webhook module mbr_genpass and to push the most current contact data to ActiveMember360 you would use Contact Push (mbr_genpass can also perform the function of Contact Push but it is now a legacy method that will at some point be deprecated).

These options give total control over when webhooks are used to send HTTP POSTs. Obviously, significant numbers of contacts should not be sent through the automation at the same time, as this could result in the same issues as using Automatic Webhooks.

Please note where ActiveMember360 changes the contact data these changes are always current within WordPress and there is no need to use any webhook.

So, regarding the use of webhooks the choice is with the user of ActiveMember360.

Either use Automatic Webhooks which may result in high volumes of HTTP POSTs being sent to your server, or manually configure Automation Webhooks for more control.

Webhook Modules

ActiveMember360 provides several webhook modules that can be used with ActiveCampaign webhook URLs. Full details and examples of how to use each module are detailed within:

We recommend the webhook modules detailed here are only used with ActiveCampaign automation webhooks.

Custom Webhook Modules

ActiveMember360 includes a capability known as Custom Webhook Modules.

This essentially allows a user to program their own webhook module for use with ActiveCampaign automation webhooks to manipulate/reformat/reconfigure ActiveCampaign contact records using ActiveMember360.

To be able to use Custom Webhook Modules it requires a knowledge of PHP as they must be programmed using that development language.

If you wish to use Custom Webhook Modules and require further details please submit a support ticket here.