All URIs are relative to https://localhost/
Method | HTTP request | Description |
---|---|---|
loginPost | POST /login | |
refreshTokenGet | GET /refresh_token |
InlineResponse2002 loginPost(authenticationString)
Returns a session token to be included in the rest of the requests. Note that API key authentication is required for all subsequent requests and user auth is required for routes in the `User` section
var TheTvdbApiV2 = require('the_tvdb_api_v2');
var apiInstance = new TheTvdbApiV2.AuthenticationApi();
var authenticationString = new TheTvdbApiV2.AuthenticationString(); // AuthenticationString | JSON string containing your authentication details.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.loginPost(authenticationString, callback);
Name | Type | Description | Notes |
---|---|---|---|
authenticationString | AuthenticationString | JSON string containing your authentication details. |
No authorization required
- Content-Type: application/json
- Accept: application/json
InlineResponse2002 refreshTokenGet()
Refreshes your current, valid JWT token and returns a new token. Hit this route so that you do not have to post to `/login` with your API key and credentials once you have already been authenticated.
var TheTvdbApiV2 = require('the_tvdb_api_v2');
var defaultClient = TheTvdbApiV2.ApiClient.default;
// Configure API key authorization: jwtToken
var jwtToken = defaultClient.authentications['jwtToken'];
jwtToken.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwtToken.apiKeyPrefix = 'Token';
var apiInstance = new TheTvdbApiV2.AuthenticationApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.refreshTokenGet(callback);
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json