cancel
Showing results for 
Search instead for 
Did you mean: 

IRPA2.0 Web Service Post - x-csrf-token

Muthu_Prabakara
Explorer
0 Kudos
774

Hi,

I have created IRPA bot to update the custom business object data via API through IRPA after business process execution. We have custom script that makes dummy call to the S4 HANA cloud API. From the error response, we will retrieve csrf token however after IRPA Core SDK update the below codes stopped working. Please suggest if you have any other alternative to retrieve csrf token to do post/patch operation to S4 API.

const options = { resolveBodyOnly: true, responseType: 'json', url: vURL, method: 'GET', headers: { 'x-csrf-token': 'fetch', 'Accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': auth }};var token = '';try { const response = await irpa_core.request.call(options);} catch (error) { token = error.response.headers['x-csrf-token'];
}Thanks,Muthu
View Entire Topic
Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

antoraja

As you had mentioned the code was working with earlier Core SDK.

Can you tell me which version of core SDK the code works and version of SDK where the code not to work.
Muthu_Prabakara
Explorer
0 Kudos

It was IRPA_CORE - 1.9.66. Now I have updated it to 1.17.36 to fix a recent issue with screen not recognized correctly due to lower IRPA_Core version.

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

You can check the Webservices Sample BOT from BOT store(Learning Content)