impronunciable / moviedb

MovieDB API node.js Library
Other
334 stars 70 forks source link

Connection problems #78

Open SleeplessFox opened 7 years ago

SleeplessFox commented 7 years ago

Hi, trying to connect with

var authConfig = require('./config/auth');

const tmdb = require('moviedb')(authConfig.tmdb.clientID, 'de');
tmdb.searchMovie({query:  'Alien'}, function(err, result) {
    if(err)
            throw (err);
    console.log(result);
});

I get a "Error: getaddrinfo ENOTFOUND deauthentication deauthentication:80".

Any idea what the problem can be?

Thanks a lot.

grantholle commented 6 years ago

The second parameter in the 'constructor' is an alternative endpoint. By default it's https://api.themoviedb.org/3/, but you're passing in de.

So it's trying to authenticate at deauthentication instead of https://api.themoviedb.org/3/authentication