3

I have a C# application using version 2.0.1.0 of the Rally Rest API for .NET. The application will successfully query Rally for data, but when I try to create an object, an error is returned indicating invalid key. This issue started today and is occurring for multiple users of the application. I use the following line of code to authenticate.

myRestApi = new RallyRestApi(Rally_username, Rally_password, Rally_URL, "v2.0", myProxy);

I have read some help online indicating the need for a security token, however this note makes me feel like that is not needed: "Note: When using any of the Rally REST Toolkits or the App SDK this will be automatically handled. "

I have tried updating to version 3.0 (Beta), but this does not resolve the problem.

  • Contact the owners of the Rally Rest API. Perhaps your account has been disabled. – CodeCaster May 27 '15 at 20:00
  • My application also started getting the same error from today. I am using java api, I tried using the "apiKey" for a single user it works, but using username/password it keeps failing. – sid May 27 '15 at 23:43
  • I have the same issue in that the "apiKey" works, but when using the username/password, it fails. – user3620851 May 28 '15 at 13:39
  • I am too getting the same problem since yesterday. – hariszhr May 28 '15 at 15:50

2 Answers2

0

There are reports that using ApiKey instead of basic authentication with username/password resolves the invalid key error.

Rally .NET toolkit supports ApiKey authentication.

The constructor for v2.0.1:

restApi = new RallyRestApi("_abc123","https://rally1.rallydev.com","v2.0");

The constructor for v3.0.1:

restApi.Authenticate("_abc123", "https://rally1.rallydev.com", allowSSO: false);
nickm
  • 5,936
  • 1
  • 13
  • 14
0

I was getting the same error and noticed it was not recognizing my username and password that I had stored in the <appSettings> section of Web.config. For some reason it would not allow them to be read so I decided to store the credentials elsewhere, in Properties => Settings of my app and it has worked ever since.

Here's a code snippet of how the Rally API initialization looks like for me:

RallyRestApi restApi = new RallyRestApi(webServiceVersion: "v2.0");

string user = Properties.Settings.Default.username;
string pass = Properties.Settings.Default.password;
string rallyURL = Properties.Settings.Default.rallyURL;

restApi.Authenticate(user, pass, rallyURL, proxy: null, allowSSO: false);

Hope it helps!

w0ns88
  • 344
  • 2
  • 9
  • 28