You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BugFor errors / faults / flaws / inconsistencies etc.MajorIndicates the severity or impact or benefit of an issue is much higher than normal but not critical.wontfixIf you can reproduce this issue, please reopen the issue or create a new one describing it.
BugFor errors / faults / flaws / inconsistencies etc.MajorIndicates the severity or impact or benefit of an issue is much higher than normal but not critical.wontfixIf you can reproduce this issue, please reopen the issue or create a new one describing it.
Hello,
I’ve created a new PHP script which calls Piwik_API_Request. I’ve included the token_auth variable in the call but I keep getting:
```
Array ( [result] => error [message] => You can’t access this resource as it requires a ‘view’ access for the website id = 2. )
```
This is part of the code:
```
define(‘PIWIK_INCLUDE_PATH’, ‘.’);
define(‘ENABLE_DISPATCH’, false);
require_once PIWIK_INCLUDE_PATH . “/index.php”;
require_once PIWIK_INCLUDE_PATH . “/modules/API/Request.php”;
Piwik_FrontController::getInstance()→init();
$request = new Piwik_API_Request (“method=VisitsSummary.get
&idSite=$idsite
&period=year
&date=last2
&format=PHP
&serialize=0
&prettyDisplay=0
&token_auth=$token_auth”);
$result = $request→process();
print_r($result);
```
The call doesn’t produce any error if I’m logged in.
The text was updated successfully, but these errors were encountered: