[Solved] How to call third party Restful API [closed]
The problem is that you are mixing up options of the library with HTTP headers. Try with this instead: public static void Main (string[] args) { string url = “https://dashboard.reviewpush.com/api/company/locations”; using (var client = new WebClient()) { client.Headers[HttpRequestHeader.ContentType] = “application/json”; client.Headers[“X-Api-Key”] = “key”; client.Headers[“X-Api-Secret”] = “secret”; string s = client.DownloadString(url); Console.WriteLine(s); } } You might … Read more