Import DB and skiping wizard & token creation

Hello! I want to test a custom API. I’m using the official Docker image of Matomo, along with a custom SQL image initialized by a Matomo SQL dump. This setup allows me to bypass the setup wizard and also eliminates the need to create an authentication token manually. However, when I try to use the token, the response suggests that I don’t have viewing rights for website 1. What’s perplexing is that this token was initially generated by the superuser, who should have viewing access to all websites. Does Matomo deactivate the tokens when a new instance is created?

Maybe @innocraft knows if the tocken is valid only on specific server data? (eg. server name, etc.)

it’s a bit odd if tokens get deactivated when a new instance is created, especially if it was initially generated by the superuser
matomo should usually recignize the superuser’s privileges. maybe it’s a quirk in the setup or some setting not aligning as expected. you should check the configuratios, token gener-n process and any access restrictions that might be causing this hiccup. have u checked matomo’s logs or error messages during the token usage?

The token is displayed inside the security tab. As for the logs, I’m not seeing anything inside tmp/logs/matomo.log after activating both log_writers[] = file and log_level = DEBUG

Can you confirm a few things, please?

  • you have a working Matomo instance with a website with ID 1, you create a token and it works in this instance and stops working when you ‘clone’ the instance by spinning up a new docker and importing the SQL dump? Or is the process different?
  • if you create a new token manually in the new instance, that one does work?
  • any other important replication steps to know about?

Apologies for my late response:
Yes, I have a working instance with an website with the ID 1. The token worked when I first created the instance, and it stopped working when I ‘cloned’ the instance. I can create a new token, and it works. As for other important steps, I’m using Java & Test Containers to start the Docker instances.

Hi @michalkleiner
Any update on this question?