New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't get auth token from the Piwik API (v3) for a specific user / newly created user #11159
Comments
Hey, we have the same issue! I don't want to take a look directly to the database for this because using an (available) API is always better. Because our scripted workflow is broken now, our company decided to downgrade back to 2.17.1 until there is a solution for this. :( |
Thanks for the report. This is indeed a problem if you need the token_auth. So far we think the best way to provide a workaround would be to create a new plugin on the marketplace, which would add the token_auth to all API methods exporting users information. Would maybe one of you be able to create this plugin? |
This is not a regression since the API is still the same and still works see eg in the mobile app etc.
There is no way anymore to get the original password from the database since it is hashed. You need the original password to get the token |
Maybe App-specific passwords could help with this use case? we'll discuss this possibility in #6559 (comment) |
I'll close this issue now, as it won't be possible in any way to receive the auth tokens as of Matomo 4. If you need to automate anything you can create app specific tokens for a user or temporary system token to use them in external applications. |
the solution is documented in the FAQ at https://matomo.org/faq/general/faq_114/ including how it will work for Matomo 4 and newer |
Hi there!
After upgrading Piwik to v3, the removal of auth tokens from the list of users / specific user / newly created user broke my application, so I fixed it but now I can't get the auth token using the Piwik API in order to log the users in using an iframe.
I use the
getTokenAuth()
method but that causes a new error when trying to log in the user using that auth token, and the errorError: You can't access this resource as it requires an 'view' access for the website id = 91.
shows up. The weird part is that the site id 91 has view access already when I run thegetSitesAccessFromUser()
method to check the access of all sites (in my case, the user has one site).I've read about this problem on the forums and #10938 but can't find a solution.
Any ideas how can I get the auth token through the Piwik API? I don't have access to the Piwik Database.
The text was updated successfully, but these errors were encountered: