thetvdb / v4-api

Founded in 2006, TheTVDB is one of the longest-running community-driven TV and Movie databases. With content metadata across hundreds of thousands of TV series and movies, TheTVDB powers many of the largest media centers in the market. Developers across the world build and rely upon TheTVDB's APIs to power their apps, utilities, and projects, generating millions of API calls per day. In our GitHub repository you will find all of the necessary support and v4 API documentation to make use of TheTVDB's metadata. Come and join us!
140 stars 13 forks source link

v4 pin not working #52

Closed mark-hahn closed 3 years ago

mark-hahn commented 3 years ago

I must be doing something stupid. I just subscribed and my pin isn't working. Details ...

curl -X 'POST' \
  'https://api4.thetvdb.com/v4/login' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{"pin": "<mypin>"}'
{
  "status": "failure",
  "message": "InvalidAPIKey: apikey invalid",
  "data": null
}

Any suggestions?

EDIT: I also tried this with my pre-subcription apikey and my new legacy apikey. Didn't work either ...

curl -X 'POST' \
  'https://api4.thetvdb.com/v4/login' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{"pin": "<my pin>", "apikey":"<my api key>"}'
emily-helwig commented 3 years ago

@mark-hahn Hi Mark! Take a look at the documentation here: https://app.swaggerhub.com/apis/thetvdb/tvdb-api_v_4/

You'll need two things to log in:

  1. A v4 API key, with "End-User Subscriptions" selected as the funding method. You can apply for a v4 key through your Dashboard --> API Keys.
  2. Your subscriber PIN, which it seems as though you already have.

Once you have both of these items (looks like you're just missing a user-supported v4 key), you can login on the API, receive a bearer token, and be able to authorize yourself and utilize the API.

Please try this and let me know if it works. Thanks!

mark-hahn commented 3 years ago

Thanks, I'll try that.

FYI: I was misled in the documentation. It said "v4 API keys are project-specific and not required for most users". I assumed I was one of the "most users".

mark-hahn commented 3 years ago

Hmmm. It says company name required to get an api key.. I guess I'll make up a name.

antheaezzell commented 3 years ago

@mark-hahn confirming that we can close this ticket for you?