Jefledge
Jefledge

Reputation: 69

How do I pass a bearer token in a WSO2 Integration Studio ESB Application to be able to call an API in WSO2 API Publisher?

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

Answers (1)

Amila De Silva
Amila De Silva

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

Related Questions