API: invalid developer key

Discussion and information for XML-RPC interface.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
Cynthia
TestLink user
Posts: 7
Joined: Tue Jul 29, 2008 2:28 pm
Contact:

API: invalid developer key

Post by Cynthia »

Hi,

I am currently evaluating TestLink to see if this is the test case management tool we want to use at my company. I am trying out the ruby example from the API but I keep getting the error:

result was: code2000messageCan not authenticate client: invalid developer key

So, I am trying to figure out where this developer key is. I looked in the mysql testlink.users table and found a similar looking string in the password column, but that didn't work either. Any hints on where this devkey is or how to generate it? Sorry if this was mentioned elsewhere, but I searched the forum and didn't find the answer. Thanks.

Kind regards,
Cynthia
fman
Member of TestLink Community
Posts: 3108
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

developer key is created when you create a user.
login as TL administrator and create a user.
let us know
Cynthia
TestLink user
Posts: 7
Joined: Tue Jul 29, 2008 2:28 pm
Contact:

Post by Cynthia »

Hi,

Maybe I am not looking in the right place? Where would I see this developer key? In the user management page? I have created a few different users, one with admin role, the other with test designer role. I didn't see any indication in the UI of a developer key. Please advise.

Kind regards,
Cynthia
fman
Member of TestLink Community
Posts: 3108
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

you are right something is missed.

Check for similar topic on mantis.
If not found open a new one

regards
fman
Member of TestLink Community
Posts: 3108
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

got!

create custom_config.inc.php with:

<?php
$tlCfg->api_enabled = TRUE;

?>

valid for 1.8

then using menu item Personal you will got a new button under
change password section

let me know
Cynthia
TestLink user
Posts: 7
Joined: Tue Jul 29, 2008 2:28 pm
Contact:

Post by Cynthia »

Hi,

I think I am getting further now. I was able to get the button to generate the developer key. But when I click it, I get this error:

Fatal error: Call to undefined function xgenerateapikey() in C:\xampp\htdocs\testlink\lib\usermanagement\userInfo.php on line 53

I had to change line 53 from:
$op = xgenerateApiKey($args);

to:
$op = generateApiKey($args);

in order for the key to be generated. But now I can learn how to script against the API. Thanks for your help.

Kind regards,
Cynthia
fman
Member of TestLink Community
Posts: 3108
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

ok i will check code
havlatm
Member of TestLink Community
Posts: 940
Joined: Mon Oct 31, 2005 1:24 am
Location: Czech

Post by havlatm »

Andreas invalidates the function for unknown reason (as found Cynthia). The code of Beta2 needs to remove 'x' letter to work. It's corrected in CVS now.
Post Reply