Skip to content

HTTP Error 401: Unauthorized #242

Description

@RaiaN

Hello.
We experience a lot of 401 errors just after 28 October. Changing API key is not working. Could you say is that ok?
We are using sendgrid-python installed from pip like "pip install sendgrid".

Code:

            sg = sendgrid.SendGridAPIClient(api_key=API_KEY)
            subject = "Some subject"
            from_email = "1@gmail.com"
            to_email = "2@gmail.com"
            content = Content('text/html', html content)
            mail = Mail(Email(from_email), subject, Email(to_email), content)
            response = sg.client.mail.send.post(request_body=mail.get())
            msg, status = response.body, response.status_code
            logging.info(status)
            logging.info(msg)

Tried to set ENV variable but it doesn't help too.

Best regards,
Peter

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: questionquestion directed at the library

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions