# Campaign: Webhook Action: Connect to another Mautic instance

**URL:** <https://forum.mautic.org/t/campaign-webhook-action-connect-to-another-mautic-instance/23211>\
**Category:** Product Support\
**Created:** [March 23, 2022, 3:13am UTC](https://forum.mautic.org/t/campaign-webhook-action-connect-to-another-mautic-instance/23211 "2022-03-23T03:13:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![oguruma](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/oguruma/32/1003_2.png) [@oguruma](https://forum.mautic.org/u/oguruma)\
**Post date:** [March 23, 2022, 3:13am UTC](https://forum.mautic.org/t/campaign-webhook-action-connect-to-another-mautic-instance/23211/1 "2022-03-23T03:13:03Z")

</div>

I have two Mautic installs representing 2 different sites: [site1.com](http://site1.com) and [site2.com](http://site2.com)

I’m trying to create a Campaign on [site1.com](http://site1.com) that will send a webhook to [site2.com](http://site2.com).

On [site2.com](http://site2.com), I enabled the API, created a user, and turned off CORS.

I’ve tried every configuration I can think of, but whenever the campaign action/webhook fires, I get the error below:

```auto
 Last execution error: Client error: `POST https://apiuser:***@site2.comcom/api/contacts/new` resulted in a `401 Unauthorized` response: {"errors":[{"message":"Authorization denied, invalid credentials.","code":401,"type":"access_denied"}]} 

```

I’m sure I am doing something wrong.

What should the webhook look like in the Campaign Builder to do this? Are there any settings on the receiving Mautic instance I could have wrong?

 ![Screenshot_20220322_201209](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/1/157e0635aa302c79498f32b806bf713307729eca.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:** [March 23, 2022, 7:37am UTC](https://forum.mautic.org/t/campaign-webhook-action-connect-to-another-mautic-instance/23211/2 "2022-03-23T07:37:00Z")

</div>

Hi

Do you have two different installations of mautic running ? And you are trying to pass information from the one instance to the other ?

Firstly it looks like your web hook is not set up correctly, there is no endpoint, and if you are trying to pass this information you will need to send a web hook to the correct endpoint and catch it on the other side. You should look at the Mautic API documentation, TBH I am not sure you can send a web hook to the API, you may need to use something like zapier to do this if you are not to technical, if you are more technical inclined I would suggest using [n8n.io](http://n8n.io). This way you can capture the web hook, process it and use an HTTP request to connect to the Mautic API

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [March 23, 2022, 7:43am UTC](https://forum.mautic.org/t/campaign-webhook-action-connect-to-another-mautic-instance/23211/3 "2022-03-23T07:43:11Z")

</div>

Hi,  
After enabling basic auth, just refresh the cache with `php bin/console cache:clear`.  
Let me know if it worked.  
J
