Hi,
I am trying to connect to Concur Expense reports API from CPI-DS using OAuth2 authentication.
I tried from the postman, I passed the headers Authorization: Basic {Base64 encoded username:password} and X-ConsumerKey headers while retrieving the token. The token received is then passed while calling the actual API with the header Authorization: OAuth {Access_token}. I get the API response with the report details. I generated the WADL from that.
When I try the same in CPI-DS, I get the below error.
Error:
RUN-248051 |Data flow T_ISM_Concur_ExpenseReport_DF_ISM_Concur_ExpenseReport|Transform Transform2-Function1 HTTP error: Response Code:<400 , Bad Request> Body: <<Error> <Message>You must provide your consumer key in an X-ConsumerKey header.</Message> </Error>>
Note: I get same error response when I do not pass the X-ConsumerKey header from Postman as well.
Below are some Datastore configurations which I tried:
1. Passing the access_token or consumer key in the Authorization schema.
2. OAuth2.0: Passing the header in Additional header field.
Data flow
Web service call step mapping:
P.S: I am not sure if passing the consumer key at WS call here would be of any help as I am unable to retrieve the token in the first place. Also, the ‘-‘in X-ConsumerKey is changed to _ when the schema gets imported in the datastore.
Please help and suggest ways to resolve this.
Thanks
Sowmya S