Integrating API access tokens

In the preceding section, we introduced API authentication to prevent unnecessary access to the API. Even the authenticated users can overload the API by unnecessarily accessing it, therefore, we need to implement user tokens to limit the use of the API. There can be many reasons for limiting requests to an API. We can think of two main reasons for limiting the API access as listed here:

  • Avoid unnecessary overloading of server resources
  • Bill the users based on API usage

If you are developing a premium API, it's important to track the usage for billing purposes. Various APIs uses unique parameters to measure API usage. Here, are some of the unique ways of measuring API usage:

  • Twitter API uses number of requests per hour ...

Get WordPress Web Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.