I am getting a 403 on sendgrid sending locally
Hey folks,
While trying to follow the tutorial and setting up a sendgrid account and linking it in my main.wasp file, I get a 403 whenever a user on localhost tries to sign up. I haven't deployed this at all yet as I'm going step by step through the tutorial. My API keys are correct
6 Replies
Hi @haarismian. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
It seems like you're having trouble with SendGrid in your local development environment. According to a support thread (https://discord.com/channels/686873244791210014/1215756032064880711) on the Wasp Discord, SendGrid might require a URL and not accept API calls from a local development environment.
However, there's a workaround for this. You can use the Dummy provider in your development environment. This allows you to test the functionality of your app without having to set up SendGrid. Here's how you can set it up:
Once you're ready to deploy your app and you know the URL where you will deploy it, you can switch your app to actually using SendGrid.
To set up SendGrid, you need to set the provider field to
SendGrid
in your main.wasp
file and get the SendGrid API key and add it to your .env.server
file. Here's how you can do it:
.env.server
You can get the API key by creating an account on SendGrid (https://sendgrid.com/) and creating a new API key in the API Keys (https://app.sendgrid.com/settings/api_keys) section.
Remember, once you switch to SendGrid, you don't want to go back to the Dummy email provider.
If you're still having trouble, it might be a good idea to create an issue on the Wasp Github (https://github.com/wasp-lang/wasp/issues) to get more help.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @haarismian, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?Can you tell me why I am getting 403 testing my stripe integration @kapa.ai
@haarismian hmmm, so that sounds like your keys are not configured correctly.
Did you set env vars prefixed with SENDGRID in your .env.server? Also, is the email you chose to be doing the sending (in main.wasp) the same as the one you set up with Sendgrid?
Btw here are the Wasp docs on it https://wasp-lang.dev/docs/advanced/email#using-the-sendgrid-provider .
Hello I have the same problem, I followed the documentation.
I created a sendGrid account, I created a sender, verified the sender, copied an API key with maximum permission.
I get "Failed to send email ResponseError: Forbidden" when I try to signin 😦
Sorry for the inconvenience, actually I didn't update everything right.
There were 2 places to change the "[email protected]" in the main.wasp file, I only changed the one from "emailSender" but not the one from "auth" !
was there anywhere in the Docs where this could have been clearer?
Thanks for asking, I believe all the process is 9/10 on doc from what I saw so thanks a lot for your effort on the doc.
In the main.wasp there is a small comment here:
But for auth there is also the an email field, you could probably specify a similar comment to inform the user to change the email at this place too ?