• HTTP Error 403: Forbidden

Question related to mission Welcome Email by SendGrid

 

Can't send e-mail. Got 403 ERROR for "sens" method. Tried to make new API Key, checked permissions for the key in cabinet. Nothing helps. Other methods of API are working well with this API KEY (ex. sg.client.apikeys.get, sg.client.accesssettings.activity)

from sendgrid import SendGridAPIClient
from sendgrid.helpers.mail import Mail
sg = SendGridAPIClient("SG.ZUDKz###")
message = Mail(
    from_email='test@example.com',
    to_emails=email,
    subject="Welcome",
    plain_text_content="and easy to do anywhere, even with Python"
)
response = sg.send(message)
print(response)
18