M

Matomo Reporting HTTP API

REST discovered

Details
URL
https://<your-matomo-domain>/index.php?module=API
Docs
https://developer.matomo.org/api-reference/reporting-api
Authentication
Matomo API token (`token_auth`) api_key discovered Get key ↗
?token_auth=<credential>

Log in to your Matomo instance, then go to Administration > Personal > Security and click Create new token. Confirm your password, give the token a description, optionally set expiry and Only allow secure requests, then save the token somewhere safe. See API token instructions.

Matomo OAuth 2.0 client oauth2 discovered Set up OAuth ↗
Authorization: Bearer <credential>

In your Matomo instance, enable OAuth 2.0 in Administration > System > General settings > OAuth 2.0, then register an application/client with the redirect URI and allowed scope you need. After saving, copy the client credentials and use Matomo's OAuth endpoints on your own instance, for example https://$MATOMO_DOMAIN/index.php?module=OAuth2&action=authorize and https://$MATOMO_DOMAIN/index.php?module=OAuth2&action=token. See OAuth 2.0 setup.