# Requested url not found after authentication

**URL:** <https://forum.mautic.org/t/requested-url-not-found-after-authentication/23748>\
**Category:** Development\
**Created:** [April 14, 2022, 1:08pm UTC](https://forum.mautic.org/t/requested-url-not-found-after-authentication/23748 "2022-04-14T13:08:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sinisa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/sinisa/32/6909_2.png) [@sinisa](https://forum.mautic.org/u/sinisa)\
**Post date:** [April 14, 2022, 1:08pm UTC](https://forum.mautic.org/t/requested-url-not-found-after-authentication/23748/1 "2022-04-14T13:08:18Z")

</div>

HI everyone, I need little help with API.  
When I try to get the contacts from API I keep getting this error message:

```auto
{"errors":[{"message":"Requested URL not found: \/api\/contacts","code":404,"type":null}]} 

```

The cache is cleared, authentication was successful and its Mautic v4. Does anyone know how to fix this?  
Thx

---

<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:** [April 15, 2022, 6:10am UTC](https://forum.mautic.org/t/requested-url-not-found-after-authentication/23748/2 "2022-04-15T06:10:21Z")

</div>

Hi.  
Clear mautic cache once after enabling the api.  
Joey

---

<div class="post-metadata">

**Author:** ![sinisa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/sinisa/32/6909_2.png) [@sinisa](https://forum.mautic.org/u/sinisa)\
**Post date:** [April 15, 2022, 8:12am UTC](https://forum.mautic.org/t/requested-url-not-found-after-authentication/23748/3 "2022-04-15T08:12:41Z")

</div>

Hi,

The cache is cleared after API is enabled, and error still appear.

---

<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:** [April 15, 2022, 9:41am UTC](https://forum.mautic.org/t/requested-url-not-found-after-authentication/23748/4 "2022-04-15T09:41:10Z")

</div>

What is the call? Post or get? What are you trying to do? Add new contact? Or seach?

---

<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:** [April 15, 2022, 9:52am UTC](https://forum.mautic.org/t/requested-url-not-found-after-authentication/23748/5 "2022-04-15T09:52:22Z")

</div>

If you edit a specific contact, you need to GET /contacts/ID  
If you search, then GET /contacts with a search query  
See more:

[https://developer.mautic.org/#get-contact](https://developer.mautic.org/#get-contact)

---

<div class="post-metadata">

**Author:** ![nik](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/nik/32/6282_2.png) [@nik](https://forum.mautic.org/u/nik)\
**Post date:** [May 25, 2022, 7:01am UTC](https://forum.mautic.org/t/requested-url-not-found-after-authentication/23748/6 "2022-05-25T07:01:56Z")

</div>

Same problem for me too.  
Cache cleared, V4 Mautic  
Get to API Contacts or any other, trying to pull record for a contact it returns the same Error not found.

---

<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:** [May 25, 2022, 7:26am UTC](https://forum.mautic.org/t/requested-url-not-found-after-authentication/23748/7 "2022-05-25T07:26:01Z")

</div>

Hi, just to be clear: did you clear the cache via mautic:cache:clear command?  
Also: are you trying to do a POST or GET ?

---

<div class="post-metadata">

**Author:** ![nik](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/nik/32/6282_2.png) [@nik](https://forum.mautic.org/u/nik)\
**Post date:** [May 25, 2022, 7:51am UTC](https://forum.mautic.org/t/requested-url-not-found-after-authentication/23748/8 "2022-05-25T07:51:04Z")

</div>

Trough command  
GET with ID of the person.  
But I think I figured out the problem.

It might be server settings related and depends how your server (web server, like apache or litespeed) is configured.

So what definitely does not work:  
Clearing cache from documentation (rm- rf var/cache) does not work for sure

Running command under the user (NOT as root) in apache webserver will be successful, but sometimes, I do not know exactly when as it happened more than once but could not replicate the problem when I wanted, new prod folder under cache was created with other permissions (not a web server one and not root and not user). Seems this happens only when you run php clear command and maybe when that php is running by another handler and not under the user of the public\_html.

So solution:  
Definitely run clear cache from command  
Check chown of the prod folder under cache which in my case was the issue

I think this happened when person installs Mautic by unzip the folder directly on the hosting account.
