We looked at a simple API in the last lesson. That API didn't require authentication, but most do. Imagine that you're using the Reddit API to pull a list of your private messages. It would be a huge privacy breach for Reddit to give that information to anyone, so requiring authentication makes sense. Accessing the most useful APIs will require some sort of authentication.

APIs also use authentication to perform rate-limiting. Developers typically use APIs to build interesting applications or services. In order to ensure that it remains available and responsive for all users, an API will prevent you from making too many requests in too short a time. We call this restriction rate limiting. It ensures that one user can't overload the API server by making too many requests too fast.

In this lesson, we'll explore the GitHub API and use it to pull some interesting data on repositories and users. As you work with the GitHub API, you’ll learn about authentication and writing code that respects the APIs rate limit requirements. By the end of this lesson, you should feel comfortable with the fundamentals of API usage and you’ll have the skills you need to connect to most mainstream APIs and get data from them.

(GitHub is a site for hosting code. If you haven't looked at it, learn more about Github and why it can be a useful place to host your portfolio by checking out our lesson on setting up Github.)


  • Learn how to authenticate with APIs.
  • Learn the different types of API requests.

Lesson Outline

1. Introduction
2. API Authentication
3. Endpoints and Objects
4. Other Objects
5. Pagination
6. User-Level Endpoints
7. POST Requests
8. PUT/PATCH Requests
9. DELETE Requests
10. Further Exploration
11. Takeaways