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 accessing it unnecessarily. Therefore, we need to implement user tokens for limiting 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:

  • To avoid the unnecessary overloading of server resources
  • To bill the users based on API usage

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

  • The Twitter API ...

Get Wordpress Web Application Development - Third Edition 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.