Mautic Community Forums

API Service Accounts vs API User accounts

We have connection via OAuth2 to the mautic API, but interactions often require a user login … in other words we are using a user account to make our API calls.

Other APIs that we use (Zoom, mailgun and rackspace for example) provide service accounts that allow server-to-server API calls without having to login as a user.

Are these service-level accounts available with the mautic API? We have been unable to find any reference to such things.

Hi,
In Mautic you can create a user with login and password, which can be used for ‘basic authentication’ while using API calls.
Docs:
https://developer.mautic.org/#basic-authentication

After enabling API access in your config make sure you clear the cache.

Joey

Thanks Joey. We have a API user account using OAuth2 which we have been using for several weeks and which allows up to periodically update the mautic contacts database with external data. However, each time this occurs it is necessary for operator to log in to mautic.

What we need is a real time API connections so the mautic data can be synchronized with out external data. This is typically referred to as a “system API account” as opposed to a “user API account”.

Given that forum and google searches reveal no references to service accounts, I think we have to assume they do not currently exist. Should we may a request on the development section of the forum?

Your suggestions much appreciated, thank you, Iain.

My misread… use Basic Authentication, thank you. It appears that the OAuth2 token expiration period can be extended significantly in the API configuration page, so we will experiment with that first. Thank you.