Skip to Content

Unable to connect to SAP Concur API from CPI_DS: X-ConsumerKey error.

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

authschema.png (28.8 kB)
oauth2.png (51.3 kB)
dataflow.png (51.1 kB)
ws-call.png (25.6 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.