WSO2 API Cloud documentation is getting a whole new look at
Try WSO2 Cloud for Free
Sign in

All docs This doc

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

Throttling allows you to limit the number of hits to an API during a given period of time, typically to protect your APIs from security attacks and your backend services from overuse, regulate traffic according to infrastructure limitations and to regulate usage for monetization. For information on different levels of throttling in WSO2 Cloud, see Throttling tiers.


Let's get started.


  1. Log Sign in to the API Store and select the PhoneVerification API.

  2. Subscribe to the API using the Bronze tier if you haven't done so already.

  3. In the API Store, click the APPLICATIONS menu, click DefaultApplication to open it, and then click the Production Keys tab. If you already have an access token for the application, you may have to scroll down and click Re-generate. Access tokens expire 1 hour after creation unless you extend the period. 

    Let's invoke this API. 

  4. Click on the API, then go to its API Console tab and expand the GET method.

  5. Give values to the parameters (PhoneNumber 18006785432 and LicenseKey 0) and click Try it out to invoke the API.

  6. Note the response that appears in the API Console. As we used a valid phone number in this example, the response returns as valid.

  7. Note that you subscribed to the API on the Bronze throttling tier. The Bronze tier allows you to make a 1000 calls to the API per minute. If you exceed your quota, you get a throttling error as shown below.

    Let's try to invoke the API using an unavailable resource name.
  8. Click the APIs menu in the API Store, click the API you want to invoke and then copy the production URL in the API's Overview tab.

  9. Append the payload to the API's URL you copied earlier. For example,
    Let's invoke the API.

  10. Install cURL or any other REST client.

  11. Go to the command-line and invoke the API using the following cURL command. 
    Note that the PhoneVerification API's resource name is CheckPhoneNumber, but we use an undefined resource name as CheckPhoneNum.

    Code Block
    curl -k -H "Authorization: Bearer <access token in step 3>" '<API's URL in step 9>/CheckPhoneNum?PhoneNumber=18006785432&LicenseKey=0'

    Here's an example:

    Code Block
    curl -k -H "Authorization: Bearer 0bc0500523dddc5c973971f16b19103e" ''
  12. Note that the call gets blocked by the API Gateway with a 'no matching resource' message. It doesn't reach your backend services as you are trying to access a REST resource that is not defined for the API.