Hi all,
I know that my token number is in the API page but I would like to affect it dynamically into a variable.
Do you know where I can find it ? It’s not in the database.
Thank you
Nobody is able to help me ?
You have to use the UsersManager API.
$superuser = Zend_Registry::get('config')->superuser->login;
$password = Zend_Registry::get('config')->superuser->password;
$request = new Piwik_API_Request('
method=UsersManager.getTokenAuth
&userLogin='.$superuser.'
&md5Password='.$password.'
&serialize=0
&format=php
');
$result = $request->process();
$token = $result;
OK thanks. And do you know where i can find all the list of methods used by Piwik as Piwik::getCurrentUserLogin() … ?
I have to enter a token, to complete installation. Where can I get that token from?
THX. erbl
erbl: What screen/step are you referring to? There’s no token prompt for installation – that would create a chicken-egg problem.