sendgrid / sendgrid-ruby

The Official Twilio SendGrid Led, Community Driven Ruby API Library
https://sendgrid.com
MIT License
621 stars 324 forks source link

406 Not Acceptable #434

Closed h0jeZvgoxFepBQ2C closed 3 years ago

h0jeZvgoxFepBQ2C commented 4 years ago

Issue Summary

Since some days we only get 406 not acceptable return codes for all gem calls? We also tried with old and new admin api keys, but nothing works.

Also your chat is offline, and emails don't get answered - sorry but your customer support really sucks at the moment (we also have a paid plan, not free plan). I've always had good experiences with the sendgrid customer support, but the last weeks are really catastrophic and we are thinking about moving away from sendgrid due to your lacking customer support.

Right now we also can't manage subdomain user domain authentications, because your website is broken, but your email support doesn't answer since 3 days (Ticket 4986363).

Please... Help us.

Steps to Reproduce

All api calls

f.e.

SendGrid::API.new(api_key: "SG....").client.whitelabel.domains.subuser.get()
SendGrid::API.new(api_key: "SG....").client.subusers.get()

Code Snippet

# paste code here

Exception/Log

=> #<SendGrid::Response:0x00007f9c6c44f880
 @body=
  "<html>\r\n<head><title>406 Not Acceptable</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>406 Not Acceptable</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n",
 @headers={"server"=>["nginx"], "date"=>["Mon, 31 Aug 2020 11:12:36 GMT"], "content-type"=>["text/html"], "content-length"=>["172"], "connection"=>["close"]},
 @status_code="406"

Technical details:

eshanholtz commented 4 years ago

Hi @h0jeZvgoxFepBQ2C, doing a quick google search, it looks like SendGrid provides some guidance for 406 response codes. 406 status codes indicate that the request is missing an "Accept" header, which is interesting because the SendGrid::API client sets this header by default. The specific API endpoints you indicated have required parameters. Are you passing them in properly? This repo provides examples of the usage of an endpoint you provided.