cancel
Showing results for 
Search instead for 
Did you mean: 

Post call issue in SAP CAI and oData with API management service

srini3103
Explorer
0 Kudos

Hi All,

I'm trying to develop CAI bot with oData using API management service, API management get and post calls are working fine.

In CAI, get call triggered correctly.

In post call I'm , I added x-csrf-token and content-type in header and passed payload in body section

my post call not show any issue errors in CAI

, but backend odata call not getting triggered. debugger not triggered in back end too..

Accepted Solutions (0)

Answers (1)

Answers (1)

JonasB
Contributor

Hi Srinivasulu,

please be aware that CSRF tokens are always only valid for a specific session, so besides the "x-csrf-token" header you also need to pass the "Cookie" header.

See https://answers.sap.com/answers/13168402/view.html for a full example.

In case this does not solve your problem, please provide additional information on the error returned by the external service (e.g. by using the {{api_service_response.default.body}} and {{api_service_response.default.status_code}} variable in a Send Message action) and also which authentication you're using. Is the authentication successful for GET calls?

Regards
Jonas

0 Kudos

Thank you Jonas,

you were great help, I was taking x-csrf-token from one entity through get and passing to another entity post. so I got issue. Now my issue is resolved.