Subscribe to an API¶
APIs Published in WSO2 API Cloud are secured with OAuth tokens. Therefore, an API consumer should first subscribe to the API and generate an OAuth token before invoking the API. To subscribe to an API, you need to create an application.
Follow the instructions below try out subscribing to an API:
-
Sign in to (WSO2 API Cloud)[https://api.cloud.wso2.com] with your credentials. This opens the API Publisher portal.
-
On the API Publisher, click an API to open it.
Note
Here we use the
PhoneVerification
API that is created by following the tutorial create and publish an API. -
the Overview tab of the API, click View in Store. This takes you to the
PhoneVerification
API overview page in the API Store. Note the subscription options on the right-hand side of the page. -
Under Applications select New Application. This takes you to the Add Application page.
-
Specify the following values and click Add to register an OAuth2.0 application, which you can use to consume the
PhoneVerification
API.Name TestApp Per Token Quota 50PerMin -
On the API detail page,
- Under Applications, select the newly created
TestApp
application. - Under Tiers, select
Bronze
.
- Under Applications, select the newly created
-
Click Subscribe.
This subscribes the TestApp
application to the PhoneVerification
API on the selected business plan, and displays a message that you have successfully subscribed.
Now if you want to invoke the PhoneVerification
API, you can generate production keys for the TestApp
application and test it with the access token that you generated.