You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sendgrid-php Version:
sendgrid/php-http-client 3.9.6 HTTP REST client, simplified for PHP
sendgrid/sendgrid 7.0.0 This library allows you to quickly and easily send emails through S...
PHP Version: 7.2.19
The text was updated successfully, but these errors were encountered:
I has a similar issue when I tried to use Dynamic Templates.
The code in the repository works well with them, but if you use composer then the library dosen't work, returning a 400 error code.
I believe this issue should be resolved by #705, but it has yet to be released.
I don't have a specific timeline on the next release for this library, but I can say it is a priority and we are working on implementing a two week consistent release cycle.
I am getting a 400 Bad Request with personalization, without email is sent just fine.
Issue details
400
Array
(
[0] => HTTP/1.1 100 Continue
[1] =>
[2] => HTTP/1.1 400 Bad Request
[3] => Server: nginx
[4] => Date: Thu, 01 Aug 2019 13:55:13 GMT
[5] => Content-Type: application/json
[6] => Content-Length: 510
[7] => Connection: keep-alive
[8] => Access-Control-Allow-Origin: https://sendgrid.api-docs.io
[9] => Access-Control-Allow-Methods: POST
[10] => Access-Control-Allow-Headers: Authorization, Content-Type, On-behalf-of, x-sg-elas-acl
[11] => Access-Control-Max-Age: 600
[12] => X-No-CORS-Reason: https://sendgrid.com/docs/Classroom/Basics/API/cors.html
[13] =>
[14] =>
)
{"errors":[{"message":"Invalid type. Expected: object, given: null.","field":"personalizations.0","help":null},{"message":"Invalid type. Expected: object, given: string.","field":"personalizations.1.to.0","help":"http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.personalizations.to"},{"message":"Invalid type. Expected: object, given: string.","field":"personalizations.1.to.1","help":"http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.personalizations.to"}]}
Code:
JSON output:
Technical details:
sendgrid/php-http-client 3.9.6 HTTP REST client, simplified for PHP
sendgrid/sendgrid 7.0.0 This library allows you to quickly and easily send emails through S...
The text was updated successfully, but these errors were encountered: