Can't Authenticate to get a JWT Token

A place for developers to advertise their TheTVDB.com enabled app and get help from other developers with the API.
TerrenceT76
Posts: 5
Joined: Tue Apr 24, 2018 2:58 pm

Re: Can't Authenticate to get a JWT Token

Postby TerrenceT76 » Tue Apr 24, 2018 3:08 pm

Hi Jim or anyone,
I am having the same issue you had in the first post. I tried the suggestion from the second (removed quotes) and fussed around for the past few hours. I can't seem to get around the “Not Authorized” message.

I too do not know what to enter for “USERKEY”
I have my API Key (I had to register for a new one on https://www.thetvdb.com/?tab=apiregister), then found it under api key in my account details.
I have my Account Identifier which I used for the userkey per the documentation
I tried Site User ID as my userkey, but that didn't work.

Any lessons learned would be greatly appreciated.

Taloth Saldono
Posts: 19
Joined: Sun Apr 17, 2016 2:25 am

Re: Can't Authenticate to get a JWT Token

Postby Taloth Saldono » Tue Apr 24, 2018 3:17 pm

Terrence, if you're not accessing the /user api endpoints, then you don't need the userkey (nor username). Did you get a valid jwt token in response to the /login query?

Patrick888
Posts: 3
Joined: Wed May 02, 2018 7:03 pm

Re: Can't Authenticate to get a JWT Token

Postby Patrick888 » Wed May 02, 2018 7:10 pm

I have the same problem - I always get a 401 with "Error": "API Key Required"
I have an API key. I tried with swagger and postman but I get the same error. Since I cannot find the userkey (Account Identifier) and the documentation says that I don't always need it I skipped those two properties.

POST https://api.thetvdb.com/login
{ "apikey": "{my key here}" }

Patrick888
Posts: 3
Joined: Wed May 02, 2018 7:03 pm

Re: Can't Authenticate to get a JWT Token

Postby Patrick888 » Wed May 02, 2018 7:40 pm

More info:
Now I found my userkey and username and on this page there is no API key in the list.
On the other hand I just created an API key and I see it here:
http://platypus.thetvdb.com/eng/dashboa ... nt/apikeys
So now I'm confused. There seem to be multiple independent sites to register API keys. But the API link on
http://platypus.thetvdb.com/eng/api ponts to https://api.thetvdb.com/swagger and that's the place where I get the 401.