# Campaign Webhook 4.0.1 vs 3.x: 4.0.1 not working

**URL:** <https://forum.mautic.org/t/campaign-webhook-4-0-1-vs-3-x-4-0-1-not-working/21244>\
**Category:** Product Support\
**Created:** [October 12, 2021, 6:39pm UTC](https://forum.mautic.org/t/campaign-webhook-4-0-1-vs-3-x-4-0-1-not-working/21244 "2021-10-12T18:39:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [October 12, 2021, 6:39pm UTC](https://forum.mautic.org/t/campaign-webhook-4-0-1-vs-3-x-4-0-1-not-working/21244/1 "2021-10-12T18:39:11Z")

</div>

**Your software**  
My Mautic version is: 4.0.1  
My PHP version is: 7.4  
My Database type and version is:

**Your problem**  
My problem is:

I am trying to setup a simple web hook action inside a campaign.  
When I do this in the 4.0.1 environment and fire off the campaign it fails and I see this error:  
Last execution error: Passing in the “body” request option as an array to send a request is not supported. Please use the “form\_params” request option to send a application/x-www-form-urlencoded request, or the “multipart” request option to send a multipart/form-data request.

I then went and tested this from a 3.x installation and everything worked perfectly.

@silavapi where should this be documented ?

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [October 14, 2021, 2:57pm UTC](https://forum.mautic.org/t/campaign-webhook-4-0-1-vs-3-x-4-0-1-not-working/21244/2 "2021-10-14T14:57:20Z")

</div>

@mikew I think that it would probably sit in the developer docs under the [Webhooks](https://developer.mautic.org/#webhooks6) section.

@alanhartless is just doing some work on refactoring and moving it over to Read the Docs though, so maybe drop him a line on Slack?

---

<div class="post-metadata">

**Author:** ![alanhartless1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/alanhartless1/32/798_2.png) [@alanhartless1](https://forum.mautic.org/u/alanhartless1)\
**Post date:** [October 15, 2021, 12:52am UTC](https://forum.mautic.org/t/campaign-webhook-4-0-1-vs-3-x-4-0-1-not-working/21244/3 "2021-10-15T00:52:39Z")

</div>

This reads more like a bug. That error message is likely coming from the client the campaign code is using to deliver the request. It’s possible an upgrade to a dependency in M4 changed something.

@mikew can you provide a screenshot of your campaign action ( mask or remove anything sensitive).

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [October 17, 2021, 7:10am UTC](https://forum.mautic.org/t/campaign-webhook-4-0-1-vs-3-x-4-0-1-not-working/21244/4 "2021-10-17T07:10:27Z")

</div>

HI @alanhartless1

I used the most simple web hook, no authentication, tried putting in values in both header and data with same results:

 ![Screen Shot 2021-10-17 at 10.08.32](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/5/520120d9413f905d9c0856fbe5d2bf0ee1e34796.png)

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [November 5, 2021, 8:53am UTC](https://forum.mautic.org/t/campaign-webhook-4-0-1-vs-3-x-4-0-1-not-working/21244/5 "2021-11-05T08:53:39Z")

</div>

Hey @alanhartless1

Here are some of the errors I am seeing:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/0/0955d6895e1c24a4d7bf793e09764646319c4eec.png)

and this is what I was seeing in the system log:

```auto
[2021-11-05 04:35:58] mautic.NOTICE: PHP Notice - SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/lib/php/sessions) failed: Permission denied (13) - in file /var/www/mautic/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php - at line 106 {"maxlifetime":1440} []
[2021-11-05 07:17:38] mautic.NOTICE: PHP Notice - SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/lib/php/sessions) failed: Permission denied (13) - in file /var/www/mautic/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php - at line 106 {"maxlifetime":1440} []
[2021-11-05 07:28:14] mautic.NOTICE: PHP Notice - Undefined index: path - in file /var/www/mautic/app/bundles/CoreBundle/Controller/ExceptionController.php - at line 120 {"request":"[object] (Symfony\\Component\\HttpFoundation\\Request: GET //console HTTP/1.1\r\nAccept-Encoding: gzip\r\nConnection: close\r\nContent-Length: \r\nContent-Type: \r\nHost: ams.rocketpot.io\r\nReferer: https://161.35.210.173:443/console/\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36\r\nX-Php-Ob-Level: 1\r\n\r\n)","exception":"[object] (Symfony\\Component\\Debug\\Exception\\FlattenException: {})","logger":null,"class":"Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException","currentContent":"","layout":"Error","code":404,"anonymous":true,"baseTemplate":"MauticCoreBundle:Default:slim.html.php","templatePage":false,"template":"MauticCoreBundle:Error:404.html.php","templating":"[object] (Symfony\\Bundle\\FrameworkBundle\\Templating\\DelegatingEngine: {})","statusText":"Not Found","url":"//console","urlParts":{"host":"console"}} []
[2021-11-05 08:39:53] mautic.WARNING: PHP Warning - html_entity_decode() expects parameter 1 to be string, array given - in file /var/www/mautic/app/bundles/CoreBundle/Helper/AbstractFormFieldHelper.php - at line 204 {"list":[{"label":{"label":"","value":""},"value":0}],"choices":[],"label":{"label":"","value":""},"value":0} []
[2021-11-05 08:40:02] mautic.WARNING: PHP Warning - html_entity_decode() expects parameter 1 to be string, array given - in file /var/www/mautic/app/bundles/CoreBundle/Helper/AbstractFormFieldHelper.php - at line 204 {"list":[{"label":{"label":"","value":""},"value":0}],"choices":[],"label":{"label":"","value":""},"value":0} []

```
