jeudi 19 décembre 2019

Why ngrok send me a 403 Forbidden

I try to work with a webhook to get a JSON, I read that I should install ngrok because webhooks do not work locally, so I installed ngrok, and tried to follow this small tuto : https://medium.com/@derek_dyer/rails-webhooks-local-development-7b7c755d85e3

I created my routes :

get 'invoice/webhooks'
post 'invoice/webhooks' =>'invoice#webhooks'

And my controller :

def webhooks
   render json: response.body, status: 200
end

I also plugged my URL : https://ce0d99f7.ngrok.io/invoice/webhooks in my service to receive the webhook

I run ./ngrok http 3000 in my terminal and I receive a message

POST /invoice/webhooks         403 Forbidden

Is anyone knows how to fix that ?

Aucun commentaire:

Enregistrer un commentaire