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.

creating API

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.

resources

gettoken

#tutorial #integration #api #wso2 #wso2 esb #wso2 api manager #api invocation

WSO2 Token API Invocation From a Mediation Sequence in WSO2 APIM 3.1.0
3.05 GEEK