Some Matomo (Piwik) users automatically provide their CMS customers with Matomo statistics. If you want to provide a one-click automatic login to Matomo for your users, you can use the ‘logme’ mechanism, and pass their login & the md5 string of their password in the URL parameters:

https://stats.example.org/index.php?module=Login&action=logme&login=your_login&password=your_MD5_password

This will securely login the user (create a cookie in their browser) and redirect to the index.php on successful login. Note that this authentication method doesn’t work for a user with Super User access.
You can also specify the URL to redirect after a successful login, if different from the default Matomo (Piwik) dashboard page:

https://stats.example.org/index.php?module=Login&action=logme&login=your_login&password=your_MD5_pwd&url=http://piwik.mycompany.com/subpath/

You can also specify a website ID (idSite) that will be loaded by default after the redirect:

https://stats.example.org/index.php?module=Login&action=logme&login=your_login&password=your_MD5_pwd&idSite=145

Important: we recommend to make this request over https (SSL) in order to keep the password hash secure.

Since version 3.0 Matomo (Piwik) does not store the password as md5 any longer. As a result there is no way to access the md5 hashed password using the API. To generate the md5 password, you need the user’s raw password and then call the md5() hash function on this raw password using your favorite programming language.