I am working on "Reporting HTTP API" to export data from matomo.
It is mentioned here
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?
You can find more info about APIs here: https://developer.matomo.org/api-reference/reporting-api
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
Just for future reference: Matomo 4 allows creating multiple API token per user and you can use
UsersManager.createAppSpecificTokenAuth to create a new one.