ruby-on-railssendgridngrokaction-mailbox

Ngrok - Action Mailbox send me a 403 Forbidden


I want to receive and parse emails from my Rails application using Action Mailbox. In local, everything works fine.

I then wanted to try sending email from my Gmail account and needed to set up Sendgrid and Ngrok. To do so, I've followed the configuration from here https://guides.rubyonrails.org/v6.0/action_mailbox_basics.html

When I send an email, I have the following error in ngrok 403 Forbidden. But when I check the web interface, I can see the email.

After looking on the internet, I've added to application_mailbox.rb :

skip_before_action :authenticate_user!
skip_before_action :verify_authenticity_token

and to development.rb :

config.hosts << /[a-z0-9]+\.ngrok\.io/

But nothing works. I get the same error every time. Does anyone know what can I do to fix this issue ?

I feel that the problem may be with the URL with the password I've configured Sendgrid with but I might be wrong.


Solution

  • It was because I was using http instead of https in my sendgrid's url