You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

C# and REST API: 401 error when setting "application/schema+json" header

Accepted answer
edited Jul 2, 2018 10:19PM in Integrations and APIs 3 comments


I have been working on a light wrapper for the REST API in C# and have run into a really bizarre error that I only get in C#.

Whenever I set the "Accept" header to "application/schema+json", it will work as expected if I use the base REST API URL:

// Works as expected

However, if I change the URL to include a resource, it will return a 401 error

// returns a 401 error

From what I understand, in C#, you can only modify the accept header either with the HttpWebRequest or HttpClient classes.

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!