From the course: Introduction to Web APIs

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Make a request to the Giphy API

Make a request to the Giphy API - REST Tutorial

From the course: Introduction to Web APIs

Make a request to the Giphy API

- [Instructor] In the exercise files for this video I've included an index.html file and an empty script.js file so we can start writing code to make a request to the GIPHY API. We'll make a request to the GIPHY API the same way we made the request to the H Plus Sports API. The one small but important difference is that we need to include our authorization key in the API URL. First, let's write our fetch method, and then the URL for the GIPHY API. Now to get the specific URL endpoint, we're going to have to go back and look at the documentation. As we said in the last video, we're going to be using the random endpoint so we can get a random squirrel GIF. The URL is here, so we can copy and paste that into our code. Now, we could take kind of a shortcut and use the API explorer, but I think it's a little more helpful when first working with APIs and documentation to do it more manually. So let's go and do this in…

Contents