WaspW
Wasp16mo ago
fustuk.

SendGrid 403 Error

I have updated this part in main.wasp
 emailSender: {
    // NOTE: "Dummy" provider is just for local development purposes.
    //   Make sure to check the server logs for the email confirmation url (it will not be sent to an address)!
    //   Once you are ready for production, switch to e.g. "SendGrid" or "Mailgun" providers. Check out https://docs.opensaas.sh/guides/email-sending/ .
    provider: SendGrid,
    defaultFrom: {}

I didnt do anything else, I have a custom endpoint that sends emails properly, but when I try to register a user via email I get 403
[ Server!] Failed to send email ResponseError: Forbidden
[ Server!]     at /home/kaloyan/projects/podcast-FE/app/node_modules/@sendgrid/client/src/classes/client.js:146:29
[ Server!]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
[ Server!]   code: 403,
[ Server!]   response: {
[ Server!]     headers: {
[ Server!]       server: 'nginx',
[ Server!]       date: 'Mon, 02 Sep 2024 10:41:16 GMT',
[ Server!]       'content-type': 'application/json',
[ Server!]       'content-length': '281',
[ Server!]       connection: 'keep-alive',
[ Server!]       'access-control-allow-origin': 'https://sendgrid.api-docs.io',
[ Server!]       'access-control-allow-methods': 'POST',
[ Server!]       'access-control-allow-headers': 'Authorization, Content-Type, On-behalf-of, x-sg-elas-acl',
[ Server!]       'access-control-max-age': '600',
[ Server!]       'x-no-cors-reason': 'https://sendgrid.com/docs/Classroom/Basics/API/cors.html',
[ Server!]       'strict-transport-security': 'max-age=600; includeSubDomains'
[ Server!]     },
[ Server!]     body: { errors: [Array] }
[ Server!]   }
[ Server!] }
Was this page helpful?