cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to fetch x-csrf token

alboino_luigi_71
Explorer
0 Kudos

Dear all,

I'm trying to fetch the x-csrf token through a GET request send by POSTMAN but the system answers with 403 Forbidden (see screen-shots).

I'm using Basic Authentication with credentials (Username,Password) valid to login into SCP account of Exprivia available at the following link.

https://account.eu1.hana.ondemand.com/#/home/welcome

Please let me know where I'm wrong and how to fix the problem.

Thank you.

Best Regards.

Luigi Alboino

Accepted Solutions (0)

Answers (2)

Answers (2)

Archana
Product and Topic Expert
Product and Topic Expert

Once you have the CSRF token, you do not need the Authorization to invoke business rules. As header you need to just send X-CSRF-Token. Please send across the snapshot of your headers and body and full URL

alboino_luigi_71
Explorer
0 Kudos

Hi Archana,

I've sent the message POST only with headers x-csrf-token and Content-Type: application/json and the server sent me a response 200 OK with body JSON well formatted (see screen-shot below).

Thank you.

Bye Luigi

Archana
Product and Topic Expert
Product and Topic Expert
0 Kudos

Response says forbidden. Give Business Rules Runtime/RuleSuperUser role to your user (with which you are trying to run the API). Follow documentation for more.

alboino_luigi_71
Explorer
0 Kudos

Dear Archana,

as you suggested I've assigned RuleSuperUser role to my user (i.e. e-mail address used to access at SAP ID service) and I was able to obtain the header x-csrf-token but when I send a request POST with Basic Auth and header x-csrf-token to check if a rule works well the system send again a response 403 Forbidden instead of 200 OK with body of type JSON (see screen-shot).

In the Authorization field I've inserted:

Username=e-mail address used to access at SAP ID Service

Password=password to access at SAP ID Service

and seems that I'm not authorized yet.

Please let me know if I've to use other values for Username and Password.

Thank you.

Bye Luigi