Error plugin not activated'


(sushilbajimaya) #1

Hi everybody,
I am trying to access piwik from an API but I get an error saying plugin not activated while all plugins are active when I see from the admin. The way I have accessed the plugin is as follows:


$response = new Piwik_API_Request(‘http://sirius/piwik/index.phpmodule=API&method=UsersManager.addUser&userLogin=testUser&password=romangod’);

This is the simplest request I can send. I tried accessing couple of other methods but all gave the same error. The error is as follows:



Can you guys please check? I am using Piwik 1.4.

Regards,
Sushil


(Matthieu Aubry) #2

$response = new Piwik_API_Request(‘http://sirius/piwik/index.phpmodule=API&method=UsersManager.addUser&userLogin=testUser&password=romangod’);

you forgot index.php?module


(sushilbajimaya) #3

The url is now corrected to:
http://sirius/piwik/index.php?module=API&method=UsersManager.addUser&userLogin=testUser&password=romangod

but I still get the same error:

Any solution to this?


(sushilbajimaya) #4

The scenario is this:
I have two installations of Piwik: one to serve as the analytics tool and the other to perform API requests (do I need full installation for this?). I previously had Piwik 1.2 for making API requests and that’s when I had that plugin not activated error. Now, since both Piwik installations are of same version, making an API call should work, but I still get error. For example, while performing UsersManager.addUser operation, I get the following error:

I have made the API request as follows:
$request = new Piwik_API_Request(‘http://sirius/piwik/index.php?module=API&method=UsersManager.addUser&userLogin=testUser&password=romangod&email=sushil.bajimaya@gmail.com&alias=testUser’);

Can anybody please check and let me know?

Thanks in advance to everybody.

Regards,
Sushil


(Peterbo) #5

Did you provide the superuser token_auth in the request?

I copy&pasted your API-Request and added the superuser token-auth. Works like a charm in Version 1.5RC7.

~Peter


(sushilbajimaya) #6

Thanks. It works fine now. Superuser token should be added. And also, it also requires something more; Piwik frontend should be instantiated first. Only then, all API requests will execute, otherwise, we will get no access error.