Hello,
How can I set user access to “No access” via API like in the Administration page under Websites > Manage > Permissions?
The idea is that a user has view access to multiple websites and I need to disable access to the dashboard for a specific website.
Thanks for your help.
2 Likes
Hi @francois_tap
I think you can use the following API:
UsersManager.setUserAccess (userLogin, access, idSites, passwordConfirmation = ‘’)
From:
https://developer.matomo.org/api-reference/reporting-api#UsersManager
2 Likes
Hi @heurteph-ei,
Thanks for your response. I had tried that already and it only allows 3 values for access: view, write, admin.
Here’s the error message yield:
The parameter access must have one of the following values: [ view, write, admin ]
2 Likes
Hi @francois_tap
I tried to sniff the request on the access right deletion, and I saw:
method=UsersManager.setUserAccess&userLogin=****&access=noaccess&idSites=3
1 Like
Fantastic! I had tried a few combinations but not that one.
It works! Thanks so much!
3 Likes