In this article, I am going to show how we can invoke WSO2’s token API from a mediation sequence to get the access/bearer token which is used to invoke APIs’ secured using Oauth in WSO2. Here I have created an API in WSO2 APIM for achieving this functionality.
1. Create an API named “InvokeTokenAPI” in WSO2 API Publisher as below.
2. Go to Resources tab and create a GET resource with the name “gettoken” as shown below and click the plus icon. Then disable security for this resource and click Save at the bottom.
#tutorial #integration #api #wso2 #wso2 esb #wso2 api manager #api invocation