Skip to Content
0

403 Forbidden when POSTING from c# application

May 12, 2017 at 01:07 PM

81

avatar image

I'm writing an application which calls a SAP Gateway service. but I'm facing some problems related with my post requisition. I'll describe the steps I'm following.

First, I'm making a get requisition with username and password to take the token by x-csrf-token. Then I try to make a post requisition passing this token, but the problem is that I have been receiving the 403 Forbidden error.

I don't know why, but using the postman app to make the post requisition, both steps cited above works fine.

Another thing is that my application takes a different token for each get requisition, this is a thing that doesn't happen using postman.

To finish, I found a post of a colleague in the scn with the same problem I'm facing, but i didn't feel satisfied with the answer.

https://archive.sap.com/discussions/thread/3956649

If someone could help me, i'll be very glad.

thank you.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Enio Rafael May 12, 2017 at 03:24 PM
1

The problem was solved by adding the header "cookie = SAP_SESSIONID_GWD_100=foNn4m5...." which is returned in the get requisition.

Share
10 |10000 characters needed characters left characters exceeded