@saadsarfrazz opened this Issue on March 4th 2019

Hi,

I am working on "Reporting HTTP API" to export data from matomo.
It is mentioned here
https://developer.matomo.org/api-reference/reporting-api#authenticate-to-the-api-via-token_auth-parameter
that token_auth can be generated manually (in user settings) to be used in API reporting.
I wanted to ask if there as any programmatic way to retrieve this token e.g. using OAuth 2.0 may be?
Also what is that age of token_auth.Does it not expire unless user regenerates it?

Regards,

Saad.

@tsteur commented on March 4th 2019 Member

You can find more info about APIs here: https://developer.matomo.org/api-reference/reporting-api

Checkout UsersManager.getTokenAuth method to get token. There is no oauth and token doesn't expire unless you regenerate.

For further questions please ask in the forums: https://forum.matomo.org

@Findus23 commented on December 22nd 2020 Member

Just for future reference: Matomo 4 allows creating multiple API token per user and you can use UsersManager.createAppSpecificTokenAuth to create a new one.

This Issue was closed on March 4th 2019
Powered by GitHub Issue Mirror