Ticket #379 (closed Bug: fixed)
Interal API permission issues
| Reported by: | a2b | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | RobotRock |
| Component: | Core | Keywords: | |
| Cc: | Sensitive: |
Description
I am using a basic internal request and continue to receive the follow error despite the use of the correct token_auth:
"You can't access this resource as it requires a 'superuser' access."
$request = new Piwik_API_Request('
method=UsersManager.getUsers
&token_auth=c11c87e44b5c98a387e2968dc22fa4dc');
$result = $request->process();
I can go to the API in the admin panel and click the getUsers and it gives results to the browser just fine. Same token_auth in the URL as well. If you simply modify misc/api_internal_call.php to call UsersManager.getUsers and remove the extra data it loads when in the same browser (probably because I am logged in as admin). If I try a different browser it will not work. The token_auth appears to have no effect on authorizing the request.
In my specific implementation, I do not even want Piwik handling my sessions when using the internal API.
I have tested this on 0.2.9 as well as Release 634 from svn.
