Issues with the API

A place for developers to advertise their TheTVDB.com enabled app and get help from other developers with the API.
imthedoctor12
Posts: 9
Joined: Wed Nov 13, 2019 7:10 pm

Wed Nov 13, 2019 7:18 pm

I'm back a 401 unauthorized trying to hit the API (https://api.thetvdb.com) with an error response

{
"Error": "Valid User Account Required"
}

Except I've verified the credentials, I even tried generating a new API key, which results in a response of

{
"Error": "API Key Required"
}

additionally I'm getting a 404 trying to hit https://api.thetvdb.com/swagger

So I guess that begs the question of is the API down? Or am I doing something wrong?
tommboys
Posts: 27
Joined: Fri Nov 08, 2019 2:25 pm

Wed Nov 13, 2019 9:00 pm

imthedoctor12 wrote:
Wed Nov 13, 2019 7:18 pm
I'm back a 401 unauthorized trying to hit the API (https://api.thetvdb.com) with an error response

{
"Error": "Valid User Account Required"
}

Except I've verified the credentials, I even tried generating a new API key, which results in a response of

{
"Error": "API Key Required"
}

additionally I'm getting a 404 trying to hit https://api.thetvdb.com/swagger

So I guess that begs the question of is the API down? Or am I doing something wrong?
it's not just you. i've been having those problems too
User avatar
szsori
Site Admin
Posts: 2269
Joined: Fri Nov 03, 2006 2:23 pm

Wed Nov 13, 2019 9:11 pm

imthedoctor12 wrote:
Wed Nov 13, 2019 7:18 pm
I'm back a 401 unauthorized trying to hit the API (https://api.thetvdb.com) with an error response

{
"Error": "Valid User Account Required"
}
Try using just the original API key without the username and user key, and let me know if you still get this error.
imthedoctor12
Posts: 9
Joined: Wed Nov 13, 2019 7:10 pm

Wed Nov 13, 2019 9:23 pm

szsori wrote:
Wed Nov 13, 2019 9:11 pm
Try using just the original API key without the username and user key, and let me know if you still get this error.
Using just the api key I'm able to successfully retrieve a token :)
tommboys
Posts: 27
Joined: Fri Nov 08, 2019 2:25 pm

Wed Nov 13, 2019 10:11 pm

I gotta try that too. Will report back if it works or not
User avatar
szsori
Site Admin
Posts: 2269
Joined: Fri Nov 03, 2006 2:23 pm

Thu Nov 14, 2019 12:20 am

username and key have always been optional. They're really only needed if you're trying to work with user-specific info like favorites. So you should be able to continue the other way with just the API key, but we'll definitely look into the username/key issue a bit more this week. Thanks!
rudis1261
Posts: 8
Joined: Sun Jan 11, 2015 10:41 am

Thu Nov 14, 2019 12:38 am

Hi guys, I started getting 401's as well. I have been using the API keys for some time, and it always worked. Any clues as to why this started happening now?

I update about 150 shows every hour or two to keep my traffic to a minimum, why would only 10 of those fail with 401?
rudis1261
Posts: 8
Joined: Sun Jan 11, 2015 10:41 am

Thu Nov 14, 2019 12:39 am

Hmmm spotted my issue: `[14-Nov-2019 10:32][1MB][INFO][ERROR: Couldn't decode JWT`perhaps the format changed?
rudis1261
Posts: 8
Joined: Sun Jan 11, 2015 10:41 am

Thu Nov 14, 2019 1:20 am

Doesn't even work on the swagger docs. Seems to ignore any POSTED value. Ie I set my apikey in the posted JSON object, ignores this and throws 401.
Tracy
Posts: 24
Joined: Wed Oct 24, 2018 2:16 pm
Location: Brighton, UK

Thu Nov 14, 2019 5:27 am

swagger is using v3 api: returns header "x-thetvdb-api-version": "3.0.0".

I think that's why everything has stopped working.
Post Reply