O'Reilly logo

WordPress Web Application Development - Second Edition by Rakhitha Nimesh Ratnayake

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 uses the number ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required