API Key is correct, but only when viewing version.

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
jdraughn
Newbie
Newbie
Posts: 9
Joined: April 8th, 2009, 6:35 am

API Key is correct, but only when viewing version.

Post 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.
Last edited by jdraughn on June 20th, 2009, 7:18 am, edited 1 time in total.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

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

Post 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
jdraughn
Newbie
Newbie
Posts: 9
Joined: April 8th, 2009, 6:35 am

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

Post 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.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

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

Post by shypike »

BTW: The version API-call does not need the API key!
User avatar
switch
Moderator
Moderator
Posts: 1380
Joined: January 17th, 2008, 3:55 pm
Location: UK

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

Post 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
Post Reply