Reputation: 69
I am new to WSO2 and would like to call an API at the end of a WSO2 ESB application that transfers files to be able to send a notification to a messaging service which is what the API does. I am unsure of how to pass the bearer token in the xml of the ESB application to call the api endpoint and authorize the request.
Upvotes: 0
Views: 887
Reputation: 716
You can use a property mediator to send an Authorization header
<property name="Authorization" value="Bearer 1234-1234-11111" scope="transport" />
Put this before the <endpoint>
block and it'll send an Authorization Header with the Bearer token 1234-1234-11111 to the backend.
Upvotes: 1