# Problems with OAuth on DEV installation

**URL:** <https://forum.mautic.org/t/problems-with-oauth-on-dev-installation/31910>\
**Category:** Product Support\
**Created:** [April 30, 2024, 12:37pm UTC](https://forum.mautic.org/t/problems-with-oauth-on-dev-installation/31910 "2024-04-30T12:37:06Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mneumann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mneumann/32/2512_2.png) [@mneumann](https://forum.mautic.org/u/mneumann)\
**Post date:** [April 30, 2024, 12:37pm UTC](https://forum.mautic.org/t/problems-with-oauth-on-dev-installation/31910/1 "2024-04-30T12:37:06Z")

</div>

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

**Your problem**  
My problem is:  
A quick question. I have Wordpress and Mautic on a localhost DEV server. Wordpress establishes a OAuth connection to Mautic and gets authenticated. But when doing the actual API request Mautic responds with 401 API authorization denied. Is there any problem when doing the OAuth request over an unsecure http connection, or do I have any other issue going on here?

* * *

New

[3 minutes ago](https://mautic.slack.com/archives/C02HV76BW/p1714480209392839?thread_ts=1714479924.251999&cid=C02HV76BW)

---

<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:** [April 30, 2024, 12:42pm UTC](https://forum.mautic.org/t/problems-with-oauth-on-dev-installation/31910/2 "2024-04-30T12:42:35Z")

</div>

Hi there!

The first thing to check is to make sure the API is turned on (ensure you clear the Mautic cache after turning on the API), the credentials are correct etc.

Also check you’re using the right URL for the Mautic instance etc.

If you’re using DDEV for Mautic you should have https - is there a reason for not having it?

---

<div class="post-metadata">

**Author:** ![mneumann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mneumann/32/2512_2.png) [@mneumann](https://forum.mautic.org/u/mneumann)\
**Post date:** [April 30, 2024, 3:55pm UTC](https://forum.mautic.org/t/problems-with-oauth-on-dev-installation/31910/3 "2024-04-30T15:55:13Z")

</div>

The API is turned on and I created the token. WordPress was able to make the connection. Just at the moment to create the bearer token it fails.

I have not installed DDEV for Mautic, I just did installed it on a regular LAMP stack. So for the moment I have no SSL, and just wonder if that is causing the problem.

---

<div class="post-metadata">

**Author:** ![mneumann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mneumann/32/2512_2.png) [@mneumann](https://forum.mautic.org/u/mneumann)\
**Post date:** [April 30, 2024, 5:53pm UTC](https://forum.mautic.org/t/problems-with-oauth-on-dev-installation/31910/4 "2024-04-30T17:53:47Z")

</div>

An additional detail. When requesting the bearer token I get the response: No refresh token parameter found, and in sequence, the API request without proper bearer token responds with: 401 API authorization denied.

Interestingly the same plugin on a life site is working, but on debugging I cannot get it do anything.

---

<div class="post-metadata">

**Author:** ![msmit](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@msmit](https://forum.mautic.org/u/msmit)\
**Post date:** [May 5, 2024, 6:22am UTC](https://forum.mautic.org/t/problems-with-oauth-on-dev-installation/31910/5 "2024-05-05T06:22:25Z")

</div>

I think the problem is in wordpress, it must be on https, cloudflared tunnel did the trick for me.

---

<div class="post-metadata">

**Author:** ![mneumann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mneumann/32/2512_2.png) [@mneumann](https://forum.mautic.org/u/mneumann)\
**Post date:** [May 6, 2024, 8:38pm UTC](https://forum.mautic.org/t/problems-with-oauth-on-dev-installation/31910/6 "2024-05-06T20:38:19Z")

</div>

alright, in this case I need to set up my entire dev environment with DDEV, is that the solution? With a Cloudflared tunnel you mean you configure your home computer to resolve to Cloudflare? That means that your IP address needs to be stable, which is not at all the case with my provider. The IP can change any second. Hope that DDEV will resolve my case, but it is some work to migrate everything

---

<div class="post-metadata">

**Author:** ![mneumann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mneumann/32/2512_2.png) [@mneumann](https://forum.mautic.org/u/mneumann)\
**Post date:** [May 10, 2024, 12:48pm UTC](https://forum.mautic.org/t/problems-with-oauth-on-dev-installation/31910/7 "2024-05-10T12:48:57Z")

</div>

I finally could install both wordpress and mautic under DDEV, but I have now a problem with authenticating. Terminating the process after granting the permission in Mautic, it has some hickup when returning to Wordpress and does not properly save the authorization. Hence I cannot make an API call at all. How do I troubleshoot such a scenario, involving both the WordPress plugin and Mautic?

---

<div class="post-metadata">

**Author:** ![mneumann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mneumann/32/2512_2.png) [@mneumann](https://forum.mautic.org/u/mneumann)\
**Post date:** [May 12, 2024, 10:40pm UTC](https://forum.mautic.org/t/problems-with-oauth-on-dev-installation/31910/8 "2024-05-12T22:40:10Z")

</div>

I found out now that on generating the Access token right after the authorization process it creates the error:  
“cURL error 60: SSL: no alternative certificate subject name matches target host name ‘mautic.ddev.site’”

So something going on with the certificates of DDEV?

---

<div class="post-metadata">

**Author:** ![mneumann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mneumann/32/2512_2.png) [@mneumann](https://forum.mautic.org/u/mneumann)\
**Post date:** [June 3, 2024, 12:27am UTC](https://forum.mautic.org/t/problems-with-oauth-on-dev-installation/31910/9 "2024-06-03T00:27:57Z")

</div>

I finally found out the solution, which is described here:

> **[FAQ - DDEV Docs](https://ddev.readthedocs.io/en/stable/users/usage/faq/#can-different-projects-communicate-with-each-other)**
>
> Do local website development on your computer or in the cloud with DDEV.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [June 4, 2024, 12:28pm UTC](https://forum.mautic.org/t/problems-with-oauth-on-dev-installation/31910/10 "2024-06-04T12:28:03Z")

</div>

Closed on June 4, 2024, 12:28pm UTC

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
