Obtain a JWT token not working (

A place for developers to advertise their TheTVDB.com enabled app and get help from other developers with the API.
chrisbln
Posts: 3
Joined: Mon Feb 05, 2018 8:12 am

Obtain a JWT token not working (

Postby chrisbln » Mon Feb 05, 2018 8:31 am

I try to optain a JWT token with the POST /login, but I got a 401 error.

My account is new and I coudln't activate with the given link. Error is ReflectionException in Container.php line 779. For that problem I used the reset password workaround.



Code: Select all

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{
  "apikey": "mykey"
}' 'https://api.thetvdb.com/login'



Code: Select all

{
    "Error": "Not authorized"
}



Code: Select all

{
  "date": "Mon, 05 Feb 2018 13:25:13 GMT",
  "www-authenticate": "JWT realm=jwt auth",
  "server": "cloudflare",
  "x-powered-by": "Thundar!",
  "expect-ct": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"",
  "vary": "Accept-Language",
  "content-type": "application/json; charset=utf-8",
  "status": "401",
  "x-thetvdb-api-version": "2.1.2",
  "cf-ray": "3e8631c5ed1f266c-FRA",
  "content-length": "33"
}

chrisbln
Posts: 3
Joined: Mon Feb 05, 2018 8:12 am

Re: Obtain a JWT token not working (

Postby chrisbln » Sun Feb 11, 2018 10:31 am

Nobody can help me? Did I something wrong?

DarklightIndigo
Just zis guy, you know?
Posts: 7656
Joined: Sun Apr 27, 2014 9:16 am
Location: San Francisco
Contact:

Re: Obtain a JWT token not working (

Postby DarklightIndigo » Sun Feb 11, 2018 11:41 am

The only thing I can think of is probably wrong, which is running curl as a GET rather than a POST.

I'm throwing this out there knowing that I honestly have no clue about these things.
Strangers are just the friends we haven't met yet.

chrisbln
Posts: 3
Joined: Mon Feb 05, 2018 8:12 am

Re: Obtain a JWT token not working (

Postby chrisbln » Mon Feb 12, 2018 7:50 am

Thank you for your attention.

I tried this on:
https://api.thetvdb.com/swagger#/Authentication
Chrome Postman
Retrofit API

Nothing helps me...

I have very popular Android app with alot of people who wants more episode information.
https://play.google.com/store/apps/deta ... .moviebase