What's with all the API Warning

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
iecus
Newbie
Newbie
Posts: 9
Joined: January 15th, 2013, 6:07 pm

What's with all the API Warning

Post by iecus »

today everything I try to download is causing sab to report the warning below. I use a 3rd party sabnzbd via google chrome and I checked the API in the config/general and looked at the 3rd party program and its the same API in both so why am I getting killed with all of these API key incorrect.

API Key incorrect, Use the api key from Config->General in your 3rd party program: 192.168.1.2>Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: What's with all the API Warning

Post by sander »

Somewhere on your LAN (on the Mac with IP address 192.168.1.2) there is a Firefox (version 10.0.2) which has a plugin installed, which has no correct API key.

So ... can you find that Mac? Can you find Firefox on it? Can you find the plugin?
iecus
Newbie
Newbie
Posts: 9
Joined: January 15th, 2013, 6:07 pm

Re: What's with all the API Warning

Post by iecus »

Sander, that's what I thought also, when I checked FF on the pc with that IP sabnzbd plugin was not installed, I only have it installed on google chrome and that's the 1 with the correct API, I even removed it and C/P it back from the 3rd party API section in sab.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: What's with all the API Warning

Post by shypike »

You should look for the root cause, but it is possible to disable the warning.
Config->Special->api_warnings
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: What's with all the API Warning

Post by sander »

iecus wrote:Sander, that's what I thought also, when I checked FF on the pc with that IP sabnzbd plugin was not installed, I only have it installed on google chrome and that's the 1 with the correct API, I even removed it and C/P it back from the 3rd party API section in sab.
PC? It's a Mac, right?

Just turn that system off, and see if the warning goes away ...
iecus
Newbie
Newbie
Posts: 9
Joined: January 15th, 2013, 6:07 pm

Re: What's with all the API Warning

Post by iecus »

it's a PC, no pc's in my house are mac's. my main pc is the pc the IP reported it from and I just disabled the sab from it but it's still giving me errors. I'm running SABnzbd Version: 0.7.11. I checked my FF extension and I don't have sabnzbd installed.
iecus
Newbie
Newbie
Posts: 9
Joined: January 15th, 2013, 6:07 pm

Re: What's with all the API Warning

Post by iecus »

shypike wrote:You should look for the root cause, but it is possible to disable the warning.
Config->Special->api_warnings
Thank you, I did turn it off, but yes I would still like to get to the root cause.
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: What's with all the API Warning

Post by sander »

iecus wrote:it's a PC, no pc's in my house are mac's.
Wow, that's strange: your API warning says "Macintosh; Intel Mac OS X 10.7; rv:10.0.2". I would say that's a Mac OSX
iecus
Newbie
Newbie
Posts: 9
Joined: January 15th, 2013, 6:07 pm

Re: What's with all the API Warning

Post by iecus »

I figured it out the problem. This error was so wrong, it was CouchPotato that was causing the problem. I upgraded my CP and for some reason the API wasn't the same. I fixed the API in CP and now everything is fine.

Thank you everyone for your help.
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: What's with all the API Warning

Post by sander »

But this means that - assuming you really, really have no Mac on your LAN - CP is using a user agent "Macintosh; Intel Mac OS X 10.7; rv:10.0.2".

Confusing and weird.
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: What's with all the API Warning

Post by sander »

Update:

I installed CouchPotato and I can confirm the weird user agent setting provided by CP:

Code: Select all

2013-02-10 00:36:53,808::WARNING::[interface:189] API Key incorrect, Use the api key from Config->General in your 3rd party program: ::ffff:127.0.0.1>Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
I had a look at CP's source code, and it's here:
couchpotato/core/plugins/base.py:

headers['User-Agent'] = headers.get('User-Agent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.2) Gecko/20100101 Firefox/10.0.2')
Maybe the same header is used (and needed) towards public websites. "Needed" because maybe it would be blocked otherwise?

EDIT: I contacted CP's author, and I created an issue: https://github.com/RuudBurger/CouchPota ... ssues/1406
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: What's with all the API Warning

Post by sander »

CouchPotato has changed it UserAgent's ID towards SABnzbd into this info:

Code: Select all

2013-02-13 18:50:25,217::DEBUG::[interface:420] API-call from ::ffff:127.0.0.1 [CouchPotato linux - git-673843fb - v2] {'output': 'json', 'apikey': 'kloptniet', 'mode': 'queue'}
2013-02-13 18:50:25,230::DEBUG::[interface:420] API-call from ::ffff:127.0.0.1 [CouchPotato linux - git-673843fb - v2] {'output': 'json', 'apikey': 'kloptniet', 'limit': '15', 'mode': 'history'}

So ... no more confusion! :-)
jtilles
Newbie
Newbie
Posts: 1
Joined: April 18th, 2021, 12:16 pm

Re: What's with all the API Warning

Post by jtilles »

I was getting an

Code: Select all

API key incorrect, Use the API key from Config->General in your 3rd party program: 172.17.0.1>GuzzleHttp/6.3.3 curl/7.69.1 PHP/7.3.27
which turned out to be I had updated my Sabnzbd API key for a different reason but forgot to update Heimdall with the correct API key and it was pinging Sab every 3ish seconds causing an error.
Post Reply