I recently got started with wso2 api manager. I managed to import an existing api which requires a bearer token to be included in the header as a way of authentication. I can not seem to find a way to include the bearer token in the API Manager therefore getting an 401 unauthorized error as a result. Can you help me resolve this Please. Thank you in advance.
I am still trying to send the bearer token using this.
Regrding the Question I ASked From Lakshitha
If you are asking how to consume an API, take a look at this and this documents.
curl -H "Authorization: Bearer <access-token>" -H "accept: application/json" "https://<server-IP>:<port>/pizzashack/1.0.0/menu" -k -v
If you want to pass the Bearer token to the backend, add the following config to <API-M_HOME>/repository/conf/deployment.toml
.
[apim.oauth_config]
enable_outbound_auth_header = true
If you want to send a custom token, take a look at this.