My Mautic version is: 2.16
My PHP version is: 7.2
Hello there, I’m trying to use mautic’s api to update contact field dynamically. I cannot use Oauth since the token(s) are expiring and I don’t want to generate new tokens since it’s should be “always working”.
I would like to use BasicAuth for this purpose, and I downloaded the example code.
My problem is: how do I set up basic auth for mautic ? If I create an htaccess + htpasswd to the mautic base url, every visitor of my website will get a prompt asking for password since I embed the mautic tracking script (?). I get all the time an error “401 Unauthorized”, probably because I have not linked a username and password to the API.
How do I proceed?
These errors are showing in the log: 401: The response has unexpected status code (401). Access denied.
Steps I have tried to fix the problem: read every single API documentation pages, searched all over Internet and didn’t find this specific problem.