Mautic 7.0.0 API Support - Broken? (Auth OK, then 500)

nginx, mariadb etc.

My Mautic version is: 7.0.0
My PHP version is: 8.3.30
My Database type and version is: 11.3.2-MariaDB-1:11.3.2+maria~deb11

Your problem

My issue is: I can clearly authenticate against the Mautic API (Feedback:

{“access_token”:“xxx”,“expires_in”:3600,“token_type”:“bearer”,“scope”:null}root@sys:/var/www/mautic/web#

But then, when running:

curl -H “Authorization: Bearer xxx” https://mautic/api/contacts

{“errors”:[{“message”:“It seems we have encountered an error (Error #500). Please report this to the administrator if it happens again.”,“code”:500,“type”:null}]}admin@sys:/var/www/mautic/web# {“errors”:[{“message”:“It seems we have encountered an error (Error #500). Please report this to the administrator if it happens again.”,“code”:500,“type”:null}]}root{“access_token”:“xxx”,“expires_in”:3600,“token_type”:“bearer”,“scope”:null}root@h1:/var/www/mautic/web

These errors appear in the log: so far, I don’t know where I should look. The error log only shows something about MaxMind :slight_smile:

Steps I have tried to fix the problem:

Checked access, verified tokens, tried other validation methods (curl), etc.—nothing worked.

I think I’m missing something, but the API is enabled (otherwise authentication wouldn’t work)—and what else? :slight_smile: Thanks in advance, I’m pretty new to APIs.

@chri.s Check If any of these are true:

  • GeoIP is enabled but
  • the GeoLite2 database is missing, corrupted, or unreadable
    -
    or MaxMind isn’t configured correctly

Hello,

does this affect the API itself?

@chri.s Offcourse that’s why you are getting the errror.

@chri.s check your logs again. there must be something in there that should give us a clue. Like this there is no telling what could be wrong.

But Maxmind is not the API I’m concerned about. I’m (currently) not interested in IP resolution.

Well, I think there’s a bigger issue here. I want to send personalized emails via API. It worked, then it didn’t, and now it’s not working again. Maybe I’m currently missing the “bridge.” Does anyone have an idea what might be causing the problem or which logs I should actually check for this?

The current sending/messaging queue is doctrine, default.

Please check logs at mautic/var/logs/* try to reproduce the issue and you’ll get logs created based on the date you tried and paste the complete log. So, we can check what’s the actual issue and also please check php error logs.

Is only one endpoint not working? Or all of them?