Page 1 of 6

Issues with the API

Posted: Wed Nov 13, 2019 7:18 pm
by imthedoctor12
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?

Re: Issues with the API

Posted: Wed Nov 13, 2019 9:00 pm
by tommboys
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

Re: Issues with the API

Posted: Wed Nov 13, 2019 9:11 pm
by szsori
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.

Re: Issues with the API

Posted: Wed Nov 13, 2019 9:23 pm
by imthedoctor12
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 :)

Re: Issues with the API

Posted: Wed Nov 13, 2019 10:11 pm
by tommboys
I gotta try that too. Will report back if it works or not

Re: Issues with the API

Posted: Thu Nov 14, 2019 12:20 am
by szsori
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!

Re: Issues with the API

Posted: Thu Nov 14, 2019 12:38 am
by rudis1261
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?

Re: Issues with the API

Posted: Thu Nov 14, 2019 12:39 am
by rudis1261
Hmmm spotted my issue: `[14-Nov-2019 10:32][1MB][INFO][ERROR: Couldn't decode JWT`perhaps the format changed?

Re: Issues with the API

Posted: Thu Nov 14, 2019 1:20 am
by rudis1261
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.

Re: Issues with the API

Posted: Thu Nov 14, 2019 5:27 am
by Tracy
swagger is using v3 api: returns header "x-thetvdb-api-version": "3.0.0".

I think that's why everything has stopped working.