austinkelleher / giphy-api

🎥 Isomorphic JavaScript client for the Giphy.com API
MIT License
84 stars 19 forks source link

TypeError: Cannot read property 'images' of undefined #58

Closed staminna closed 5 years ago

staminna commented 5 years ago

Hi

After requiring giphy-api module,

var giphy = require('giphy-api')('my-key');

giphy.search('pokemon').then(function (res) { // Print the url of the first image returned in the array console.log(res.data[0].images.original.url); });

Its working now. Perhaps the key wasn't immediately available. Thanks :)