-
Hello RingCentral Team,
I’m trying to set up a webhook for my Laravel application running locally with ngrok. My setup:
-
Laravel webhook route:
/ring-central/webhook -
Ngrok URL:
https://photostatic-seemingly-jefferey.ngrok-free.dev -
Ngrok is forwarding to
http://127.0.0.1:8000 -
Laravel handles GET, POST, and HEAD requests properly.
Thanks in advance!
I suspect this may be related to RingCentral reaching free ngrok tunnels. Could you advise on:
Any recommended configurations for local testing with ngrok?
Timeout adjustments for webhook validation?
Any restrictions on HEAD requests for free tunnels?
Code snippet for webhook handling:
if ($request->isMethod('get') || $request->isMethod('head')) { return response('Okay', 200); } $validationToken = $request->header('X-RingCentral-Validation-Token'); if ($validationToken) { return response($validationToken, 200)->header('Content-Type', 'text/plain'); } if ($request->isMethod('post')) { // Process incoming events return response()->json(['status' => 'success'], 200); } return response()->json(['error' => 'Method Not Allowed'], 405);
When RingCentral tries to validate the webhook, I get this error in my logs:
Webhook URL is not reachable: cURL error 28: Operation timed out after 5000 milliseconds with 0 bytes received
I verified that the ngrok URL works in a browser.
GET and POST requests from Postman work fine.
Only HEAD requests now correctly return 200.