I am trying to make a search with google search api using google-images
module but its giving the following warnings and I don’t know how to get rid of them.
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): HTTPError: Response code 403 (Forbidden)
DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
var app = express();
const GoogleImages = require('google-images');
const client = new GoogleImages('CSE ID', 'API KEY');
app.get("/", function (request, response) {
client.search('Steve Angello')
.then(images => {
response.end(images[0].url);
});
}); //end of get