question

Chady Boutros avatar image
Chady Boutros asked AJ Botello answered

Webhook Subscription Not Working.

Hi, i have implemented webhooks successfully and everything was working fine. I could subscribe, remove and fetch the current subscriptions from my api. This has been working for over 3 months. Now when i go to subscribe i get this error response.

<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 </title>
</head>
<body>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /restapi/v1.0/subscription. Reason:
<pre>    org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: com.google.common.net.HostAndPort.getHost()Ljava/lang/String;</pre></p>
<hr />
</body>
</html>


I don't understand what to fix and i'm at a loss of where to dig because this was all working before.

Im using the php backend framework and my code looks like this.

$params = array(
                'eventFilters' => array(
                    '/restapi/v1.0/account/~/extension/~/message-store/instant?type=SMS',
                    '/restapi/v1.0/account/~/extension/~/telephony/sessions'
                 ),
                'deliveryMode' => array(
                    'transportType' => "WebHook",
                    'address' => $address
                ));
$resp = $platform->post('/subscription', $params);


Any help would be greatly appreciated, thank you for your time.

rest api
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered Phong Vu edited

Webhooks notification is working again in sandbox environment!

My apologies for any inconvenience!

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered

Can you post the code where you handle the validation-token header? And what web framework are you using in your PHP?

You can also quickly test your account with the quick start code to see if it works with your current app and user settings.

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Chady Boutros avatar image
Chady Boutros answered

Thanks for the response, here is an image of the controller i am using. I am using Laravel framework.

I don't understand how this was working previously tho? Ill try out the quick test too. Thanks!


1581882132523.png (38.7 KiB)
1581882264719.png (5.8 KiB)
1581882388183.png (38.8 KiB)
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Chady Boutros avatar image
Chady Boutros answered

the url we are using for the $address = https://dreamlandvr.info/handleIncomingWebhook and when hitting this with Test POST's i get


1581887418359.png (30.6 KiB)
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered

Can you make a GET request to this endpoint (/restapi/v1.0/subscription) to see if you are having too many subscriptions? The maximum number of subscriptions per account is 20. Not sure if this is the cause but it's worth to check time to time too.

Also, if it fails after you subscribe for the notification, what exception do you get from within the catch {}? was that the message you posted in your original question?

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Chady Boutros avatar image
Chady Boutros answered

I can fetch the current subscriptions .. this is what i get back.

Fetching Subscriptions REPSONSE ==>{"uri":"https://platform.devtest.ringcentral.com/restapi/v1.0/subscription","records":[]}

This was all working a couple weeks ago. i Was getting all the events when a call would come in and call would end and when an SMS would come in as well. Yes thats the raw response im getting from the exception response.

<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 </title>
</head>
<body>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /restapi/v1.0/subscription. Reason:
<pre>    org.springframework.web.util.NestedServletException: Handler dispatch failed; nested except
<hr />
</body>
</html>



1581891274470.png (35.0 KiB)
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered

Oh, based on what you just posted, I see that you are running your app on sandbox and I just make a quick test and found that webhook notification is not working on sandbox right now.

For now you don't need to change or fix anything from your side. Stay tuned for our investigation and I will let you know when it's back to normal.

Sorry for any inconvenience!

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Chady Boutros avatar image
Chady Boutros answered

Awesome thanks a ton!

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Brandon Chatham avatar image
Brandon Chatham answered

Hi

We are having same issue. Please let us know when fixed.

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Mark Mikkelson avatar image
Mark Mikkelson answered

Is there an ETA on this being fixed?

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys