Page 1 of 1

API Key is correct, but only when viewing version.

Posted: June 20th, 2009, 6:40 am
by jdraughn
I have been toying around with making a user interface with .net. Once I get the class working well I want to then build an aspx based GUI using that class.

Well, when I submit the following URL:

Code: Select all

http://mydomain:8080/sabnzbd/api?mode=version&output=xml&apikey=bd5990ad8ccc5dbeec0196fab1f53235
I get the expected response of:

Code: Select all

  <?xml version="1.0" encoding="UTF-8" ?> 
- <versions>
  <version>0.4.11</version> 
  </versions>
But if I try any other mode other then version, like for instance:

Code: Select all

http://mydomain:8080/sabnzbd/api?mode=qstatus&output=xml&apikey=bd5990ad8ccc5dbeec0196fab1f53235
I get back:

Code: Select all

error: API Key Incorrect
It's driving me nuts
Oh and by the way saying version 4.11 is higher then version 4.9 is confusing as hell. 4.11 is higher then 4.09, not 4.9. I spent quite a bit of time thinking that I somehow downloaded a really old version and that  the reason I was having problems with the API key was that I somehow had mixed two installs of two different versions.

Edit: I just wanted to add thanks for the awesome app. I think I sometimes come across in a negative way even when I don't mean too.

Re: API Key is correct, but only when viewing version.

Posted: June 20th, 2009, 8:19 am
by shypike
I advise you to request access to the "release test" forum.
This gives you access to test binaries for the 0.5.0 release.
The API for 0.5.0 has been extended and restructured.
Don't waste time on building an interface for 0.4.11

Re: API Key is correct, but only when viewing version.

Posted: June 20th, 2009, 8:23 am
by jdraughn
Thanks for the advice. I was going to check the version and depending on which one the user was running enable or disable different features. I will check into the release test forum.

Re: API Key is correct, but only when viewing version.

Posted: June 20th, 2009, 8:24 am
by shypike
BTW: The version API-call does not need the API key!

Re: API Key is correct, but only when viewing version.

Posted: June 20th, 2009, 8:27 am
by switch
As shypike says, version command does not require the API Key, hence it is not checking the one you have provided. It does check it for the other api commands however, so double check that your api key provided is indeed correct, and is indeed the one listed under config>general

More information on the API Key can be found here, or on our 0.5 documentation for the API