I am facing
"406 not acceptable nginx"
..error when I call send grid api
Sometimes it gives me json response perfect but after 2 3 minutes it gives me:
"406 not acceptable" error
We have been facing this error for 3 months. Please help us.
I used the below code in c#
HttpClient client1 = new HttpClient();
client1.DefaultRequestHeaders.TryAddWithoutValidation("Content-Type", "application/json; charset=utf-8");
client1.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "authentication key");
client1.DefaultRequestHeaders.Add("on-behalf-of", "email id");
HttpResponseMessage response1 = client1.GetAsync("https://api.sendgrid.com/v3/senders").Result;
Response.Write(response1.Content.ReadAsStringAsync().Result);