Where can i find my token?


(JeanRey) #1

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


(JeanRey) #2

Nobody is able to help me ?


(vipsoft) #3

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;

(JeanRey) #4

OK thanks. And do you know where i can find all the list of methods used by Piwik as Piwik::getCurrentUserLogin() … ?


#5

I have to enter a token, to complete installation. Where can I get that token from?
THX. erbl


(vipsoft) #6

erbl: What screen/step are you referring to? There’s no token prompt for installation – that would create a chicken-egg problem.