But when I try to send an e-mail with "Hello Mail/With Mail Helper Class" code, I get following error:
Traceback (most recent call last):
File "gridsend.py", line 11, in <module>
response = sg.client.mail.send.post(request_body=mail.get())
File "/usr/local/lib/python3.6/site-packages/python_http_client/client.py", line 227, in http_request
return Response(self._make_request(opener, request))
File "/usr/local/lib/python3.6/site-packages/python_http_client/client.py", line 161, in _make_request
raise exc
python_http_client.exceptions.UnauthorizedError: HTTP Error 401: Unauthorized
Issue Summary
I can send e-mails with my api key by using curl with following examples: https://sendgrid.com/docs/Classroom/Send/v3_Mail_Send/curl_examples.html
But when I try to send an e-mail with "Hello Mail/With Mail Helper Class" code, I get following error:
Technical details: