I'm getting the following 403 error that says that I cannot send an email because my sender is not verified:
Forbidden (403)\n The from address does not match a verified Sender Identity. Mail cannot be sent until this error is resolved. Visit https://sendgrid.com/docs/for-developers/sending-email/sender-identity/ to see the Sender Identity requirements\n from\n null
SendGrid support confirmed that my sender with that email is verified on their end and said that it must be something on my end. I'm running an express js app locally and more or less copied the code directly from their docs. Does anyone have any suggestions?
const client = require('@sendgrid/mail');
require('dotenv').config();
console.log(process.env.SENDGRID_API_KEY);
client.setApiKey(process.env.SENDGRID_API_KEY);
module.exports.send = async () => {
await client.send({
from: '[email protected]',
to: '[email protected]',
subject: 'Test Email',
text: 'Testing the email body',
});
};
The console.log correctly outputs the api key which is stored in my .env as follows (with the actual key changed of course):
SENDGRID_API_KEY = "SG.the_rest_of_my_key"
In addition, I sent an email from the same address using cURL on a linux machine and that worked.

This means the "from" address does not match a verified Sender Identity. you have to add from email address in verified list on senddrid.
Please follow below link for more details about error code.
https://docs.sendgrid.com/for-developers/sending-email/smtp-errors-and-troubleshooting