Rest API Activity, 403 forbidden error for POST

Hi,
I am getting 403, Forbidden error while trying to do a POST activity using Rest API Activity.
I have given header parameter as Content-Type - application/json and input parameters :
{
“EmployeeId”:“757013”,
“EmployeeName”:“LakshmiS”,
EmployeeEmail":"lakshmis@gmail.com”,
“EmployeePhoneNo”:“9878767777”
}
I am able to successfully do a Get method on the same but PUT is throwing error.

Hi,

PUT method means means “insert, replace if already exists” . Kindly check if you are able to make PUT request to your API via some other channel say POSTMAN

Regards,
Amit

Hi,

Tested PUT and POST methods using SAP Gateway Service. Both are successful.
PUT method is also throwing 403 forbidden error in Assistedge.
I tried adding X-CSRF-Token also as header still getting same error.

Thanks and Regards,
Lakshmi Sankergi

Hi,

The HTTP 403 Forbidden client error status response code indicates that the server understood the request but refuses to authorize it. The access is permanently forbidden and tied to the application logic, such as insufficient rights to a resource.

Check if the API requires authorization

Regards,
Amit Anand

Hi Amit,

The API does require authorization.I am trying to do a GET method with X-CSRF-Token - Fetch as header for fetching the token. Can you help me to figure out how I can get the response header as output to read the token fetched.

Thanks and Regards,
Lakshmi Sankergi