Getting this error when calling the web API. Error only occurs with certain from email address.

Status Code: Forbidden 

Issue:

I was having the same problem. I discovered that the emails from of my application and the sender authentication of the SendGrid API need to be the same.

Fix:

To fix this error you need go to perform SendGrid Sender Authentication for your sender email.

To do this, You need to login to your SendGrid Dashboard and visit Sender Authentication which is under the Settings dropdown.

There are 2 Types of Sender Authentication

  1. Domain Authentication // recommended
  2. Single Sender Verification

1 Domain Authentication
IF you allow SendGrid to authenticate your domain e.g. webapp.com
THEN you will be able to successfully send an email with your SendGrid API KEY if the email from key matches the verified domain from: *@webapp.com

2 Single Sender Authentication
This is another option where you verify a single email e.g. person@email.com.
Which will then allow you to send out emails from: person@email.com via your SendGrid API KEY

Goto…

Settings -> Sender Authentication

https://app.sendgrid.com/settings/sender_auth

https://app.sendgrid.com/settings/sender_auth/senders

Sources:

https://stackoverflow.com/questions/61149142/node-js-sendgrid-mail-403-forbidden-error

Last modified: June 9, 2021

Author

Comments

Write a Reply or Comment