Skip to main content

Posts

Showing posts from August, 2014

How to configure api-key for the back-end service/API during the publishing process

This blog explains how to configure api-key for the back-end service/API during publishing process. The API key would be always constant. The scenario is: one user will register for the public API, obtain the non-expiring API-Key(let's call it as x-api-key) and publish that API on the WSO2 API Manager. Once the API is published the consumer of the API need not pass the x-api-key each time he/she is invoking the API, he/she only needs to pass the WSO2 Access Token and necessary parameters for the API. You can set the api-key as follows 1. Create custom sequence as follows and save it in a xml file. <sequence xmlns="http://ws.apache.org/ns/synapse" name="xxxxx"> <in> <header name="api-key" scope="transport" value="123456789"/> </in> </sequence> name the sequence as <API_NAME>:v<VERSION>--<DIRECTION> 2. login to the https://localhost:9443/carbon and add the xml file to t