Search code examples
laravelapingrokhttp-status-code-405http-tunneling

Ngrok returns 405 Method Not Allowed while tunneling my localhost (Laravel)


Currently working on SMS API retrieving Post request report after sending sms messages. After sending the report and try to callback the report through the API Middleware. After sms messages sent, Ngrok returns 405 Method Not Allowed.

Ngrok return

enter image description here

Callback Link Set

Api Middleware

Api Middleware


Solution

  • Your route is defined as POST request. But your image shows GET request. Either change the request method as POST or change route definition as Route::get.