How to get superuser token programmatically in the pipeline installation?

I am trying to create a pipeline to install matomo, I need a token with superuser access to be used by other services that will be consuming the matomo’s api. But I want to get this token programmatically, the only way that I found is when enter to matomo admin interface and get the token.

Hi,

I think you want to take a look at the UsersManager.getTokenAuth API.

https://developer.matomo.org/api-reference/reporting-api