Mautic Configuration
WHMAUTIC talks to Mautic through its REST API. Configure API access in Mautic before entering credentials in WHMCS.
Supported versions
Use Mautic 7.1.3 or later, or 7.2.x. Avoid 7.1.0 through 7.1.2: these versions have a bearer token bug in the API v2 endpoints that WHMAUTIC uses.
OAuth2 (recommended)
Mautic 7 ships with Basic Auth disabled by default. OAuth2 with the client_credentials grant is the recommended method, and the default for a new WHMAUTIC installation.
- In Mautic, open API Credentials from the settings menu (gear icon). The item only appears after the API is enabled.
- Click New. Under Authorization Protocol, keep OAuth 2.
- Fill in Client Name (for example, "WHMCS WHMAUTIC"). Leave Redirect URI blank, which restricts callbacks and is what the
client_credentialsgrant needs. - Save. Mautic shows the Client ID and the Client Secret.
- Enter both in WHMCS as described in Module Configuration.
The Client ID has the format <id>_<random> (for example 1_9xYz...). Copy the whole value, prefix included. Entering only the random part returns invalid_client.
Create the client through the Mautic UI, not directly in the database or through the console. A client created outside the UI can be missing its role and the linked user: the token is still issued, but every API call then returns a 500 error.
Basic Auth (legacy)
Basic Auth remains available for compatibility with older setups. Enable it under Configuration → API Settings: set API enabled? and Enable HTTP basic auth? to Yes, then save. Enter the Mautic username and password in WHMCS as described in Module Configuration.