using (WebClient wc = new WebClient())
{
wc.Headers.Add("Content-Type", "application/json");
wc.Headers.Add("Authorization", "Token 12345678");
wc.Encoding = Encoding.UTF8;
var jsonRespStr = wc.DownloadString("https://example.com/api/xxx");
}
I run the above c# script with the following result.
"{"detail":"Authentication credentials were not provided."}"
However, I use the same token call thru PostMan, it works