Invalid Accept Header

I am getting the error when using the HTTP Request Activity during preview:

“httpStatus”: “406 NOT_ACCEPTABLE”,
“title”: “Invalid Accept Header”,
“detail”: “Request Header parameter needs to pass valid Accept value”,
“errorCode”: “INV”,
“source”: “Entity Management API”

Below is a screenshot of the HTTP Request:
image

It is working in Postman. Any idea what is wrong.

you can try skip preview mode. just press OK and just run normally and see if you still get that error

I think preview is not working in recent version…

In case someone else is having a problem with the HTTP Request activity. Use the invoke code activity instead. Use the RestSharp namespace. Below is the code:

var client = new RestSharp.RestClient(SAM_URL);
var request = new RestRequest();
request.AddHeader(“X-Api-Key”, API_KEY);
request.AddHeader(“Accept”, “application/json”);
request.AddHeader(“Authorization”, Auth);
request.AddHeader(“Content-Type”, “application/json”);
var response = client.Post(request);
Result = response.Content;

Modify the code to fit your requirements.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.