API authentication with vanilla JS
This is an excerpt from my new and updated APIs and Asynchronous JS pocket guide.
Some APIs—like the Ron Swanson Quotes Generator and Random Dog—work by simply calling an endpoint.
Others—like the New York Times and many endpoints for the GitHub API—require you to authenticate who you are before you can make API calls.
How to authenticate an API To authenticate you, the API may require:
Your username and password.
gomakethings.com