We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to make a request to the Sendgrid mail/send api to send an email via javascript.
I am getting the response: {"errors":[{"message":"Bad Request","field":null,"help":null}]}"
For more context, I am using Airtable scripting to write this script.
const SENDGRID_API_KEY = "XXXXXX" // my api key, removed for the public github question const data = {"personalizations":[{"to":[{"email":"[email protected]","name":"John Doe"}], "subject":"Hello, World!"}],"content": [{"type": "text/plain", "value": "Heya!"}], "from":{"email":"[email protected]","name":"Erin Ettenger"}, "reply_to":{"email":"[email protected]","name":"Sam Smith"}}; const sendgridReq = new Request( "https://api.sendgrid.com/v3/mail/send", { method: "POST", headers: {"Content-Type": "application/json", "Authorization": "Bearer " + SENDGRID_API_KEY}, body: data } ); const sendgrid_res = await fetch(sendgridReq); const sengrid_out = await sendgrid_res.json(); console.log(`Sendgrid out: ${JSON.stringify(sengrid_out)}`);
Would love some help debugging this issue! There is no helpful information in the Bad Request error.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am trying to make a request to the Sendgrid mail/send api to send an email via javascript.
I am getting the response: {"errors":[{"message":"Bad Request","field":null,"help":null}]}"
For more context, I am using Airtable scripting to write this script.
Would love some help debugging this issue! There is no helpful information in the Bad Request error.
The text was updated successfully, but these errors were encountered: