Matomo apis are giving 500 error

Hi,

Matomo UI is working fine and so is mysql db. when i try to contact matomo apis from my website, it’s giving me 500 Internal server error. There has been no change to matomo server, it was working absolutely fine earlier. Matomo version - 3.14.0
Where can i check the logs?

Thanks in advance

To look up server error logs, check your Hosting control panel or ask your webhost.

No help from them, the error code is 500 with error message - undefined is not a function. How to troubleshoot further?

If your hosting provider won’t point you to any logs, consider switching. Do you have access to your domain control panel? Could share some screenshots? Maybe we can help you. Some hosts also store server logs outside the Document_root. Try using a ftp client.

Bye the way - Welcome to the forum :grinning:

thanks for your reply. The error message is - Uncaught exception in API: You can’t access this resource as it requires ‘view’ access for the website id = 1. piwik/core/Access.php:728

I tried to access API with user having write access. The same setup is done in another environment and it’s working fine there.

apart from this, installed logviewer plugin and checked the logs in /tmp/logs/matomo.log also. the error i see in that file is - ERROR Piwik\ExceptionHandler[2021-08-05 15:35:09 UTC] [ba080] Uncaught exception: piwik/plugins/Login/Login.php(118): You are currently not allowed to log in because you had too many failed logins, try again later.
ERROR Piwik\ExceptionHandler[2021-08-05 15:35:09 UTC] [ba080] You are currently not allowed to log in because you had too many failed logins, try again later.

i created a new user and used that token to perform some tests, but it is still failing.

I don’t know what is going on here. It’s some kind of missing permissions. Did you already check these topics? I hope this helps.