question

Oleg Zaiat avatar image
Oleg Zaiat asked Oleg Zaiat edited

Can't create webhook subscription anymore [production]

Why can't I create a subscription for a webhook anymore? A week ago everything was working.

I've got:

 com.ringcentral.RestException: HTTP Response
 =============
 status code: 400
    
 Server: nginx
 Date: Tue, 19 Apr 2022 18:02:49 GMT
 Content-Type: application/json
 Transfer-Encoding: chunked
 Connection: keep-alive
 LocalHostInfo: 10.120.28.92__20034@iad41-c01-csg11.c01.ringcentral.com
 RCRequestId: eac2922a-c00a-11ec-ae27-0050569c35a6
 X-ERROR-ID: eac2922a-c00a-11ec-ae27-0050569c35a6
 X-Rate-Limit-Group: medium
 X-Rate-Limit-Limit: 40
 X-Rate-Limit-Remaining: 39
 X-Rate-Limit-Window: 60
 RoutingKey: IAD01P10
    
 {
   "errorCode":"SUB-521",
   "message":"WebHook is not reachable",
   "errors":[
     {
       "errorCode":"SUB-521",
       "message":"WebHook is not reachable"
     }
   ]
 }

Even the incoming request, to check the address/endpoint, don't come anymore.

I've checked and I definitely can hit the address/endpoint from external.

webhookssubscription
2 comments
1 |3000

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

Did you see Yatin's comment below? This is the most likely reason for the problem you are having. Can you share the URL so we can see if we can hit it?

0 Likes 0 ·

I see now that you have shared this info. And it does appear accessible from my machine. I am not sure why RingCentral is saying it is not. You may want to escalate this issue to our developer support team so they can take a closer look.

0 Likes 0 ·

1 Answer

Yatin Gera avatar image
Yatin Gera answered Oleg Zaiat edited

Could it be possible that your server receiving the webhook is behind some firewall or in a private network?
You might be able to hit it since you are part of the same network
Could you try hitting the webhook from a public network just to be sure?
Also, make sure your webhook endpoint responds within 3 seconds when receiving a GET request so that RingCentral knows it's up and running

6 comments
1 |3000

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

I've checked by 'https://portchecker.co' if my '6f48022e8fe2.sn.mynetname.net:3333' is accessible from external - the port is OPEN.

But I still have (without any incomming request):


com.ringcentral.RestException: HTTP Response

=============

status code: 400


Server: nginx

Date: Wed, 20 Apr 2022 12:38:45 GMT

Content-Type: application/json

Transfer-Encoding: chunked

Connection: keep-alive

LocalHostInfo: 10.120.28.93__17316@iad41-c01-csg13.c01.ringcentral.com

RCRequestId: cf597584-c0a6-11ec-8ca4-0050569c35a6

X-ERROR-ID: cf597584-c0a6-11ec-8ca4-0050569c35a6

X-Rate-Limit-Group: medium

X-Rate-Limit-Limit: 40

X-Rate-Limit-Remaining: 39

X-Rate-Limit-Window: 60

RoutingKey: IAD01P10


{"errorCode":"SUB-521","message":"WebHook is not reachable","errors":[{"errorCode":"SUB-521","message":"WebHook is not reachable"}]}


HTTP Request

============

HTTP POST https://platform.ringcentral.com/restapi/v1.0/subscription


Authorization: ??

X-User-Agent: RC-JAVA-SDK Java 1.8.0_221 Windows 2003


{"eventFilters":["/restapi/v1.0/glip/webhooks"],"deliveryMode":{"transportType":"WebHook","address":"https://6f48022e8fe2.sn.mynetname.net:3333/","encryption":true,"verificationToken":"******"},"expiresIn":63072000}

at com.ringcentral.RestClient.requestRaw(RestClient.java:316)

at com.ringcentral.RestClient.request(RestClient.java:328)

at com.ringcentral.RestClient.request(RestClient.java:257)

at com.ringcentral.RestClient.post(RestClient.java:148)

at com.ringcentral.paths.restapi.subscription.Index.post(Index.java:49)


0 Likes 0 ·

I've checked by 'https://portchecker.co' if my '6f48022e8fe2.sn.mynetname.net:3333' is accessible from external - the port is OPEN.

But I still have (without any incomming request):


com.ringcentral.RestException: HTTP Response

=============

status code: 400


Server: nginx

Date: Wed, 20 Apr 2022 12:38:45 GMT

Content-Type: application/json

Transfer-Encoding: chunked

Connection: keep-alive

LocalHostInfo: 10.120.28.93__17316@iad41-c01-csg13.c01.ringcentral.com

RCRequestId: cf597584-c0a6-11ec-8ca4-0050569c35a6

X-ERROR-ID: cf597584-c0a6-11ec-8ca4-0050569c35a6

X-Rate-Limit-Group: medium

X-Rate-Limit-Limit: 40

X-Rate-Limit-Remaining: 39

X-Rate-Limit-Window: 60

RoutingKey: IAD01P10


{"errorCode":"SUB-521","message":"WebHook is not reachable","errors":[{"errorCode":"SUB-521","message":"WebHook is not reachable"}]}


HTTP Request

============

HTTP POST https://platform.ringcentral.com/restapi/v1.0/subscription


Authorization: ??

X-User-Agent: RC-JAVA-SDK Java 1.8.0_221 Windows 2003


{"eventFilters":["/restapi/v1.0/glip/webhooks"],"deliveryMode":{"transportType":"WebHook","address":"https://6f48022e8fe2.sn.mynetname.net:3333/","encryption":true,"verificationToken":"******"},"expiresIn":63072000}

at com.ringcentral.RestClient.requestRaw(RestClient.java:316)

at com.ringcentral.RestClient.request(RestClient.java:328)

at com.ringcentral.RestClient.request(RestClient.java:257)

at com.ringcentral.RestClient.post(RestClient.java:148)

at com.ringcentral.paths.restapi.subscription.Index.post(Index.java:49)

0 Likes 0 ·

Hi @Oleg Zaiat
It's not about the port being open but the URL being inconsistent
I have had a discussion with the engineering team and they all have come back with the response that the WebHook URL is not responding or is responding inconsistently.

We have less strict restrictions in the sandbox environment and we might let the webhook through even though it is inconsistently, but we cannot do the same in production

0 Likes 0 ·
Oleg Zaiat avatar image Oleg Zaiat Yatin Gera ♦♦ ·

Well, before the responding, the connection should be established, right.

According to the specs, which defines consistence of the webhook url ( https://developers.ringcentral.com/guide/notifications/webhooks/creating-webhooks )

only response timeout is specified without a connection timeout.

Let's say the 3000 milliseconds, mentioned in the documentaion, is the total timeout connection+response.

Then the question is why for the sandbox it works each time ( https://developers.ringcentral.com/api-reference/Subscriptions/createSubscription ) and the response even from the API ( https://platform.devtest.ringcentral.com/restapi/v1.0/subscription ) is around ~2500milliseconds which anyway is less then 3000milliseconds and for the production environment even the connection hasn't been established to webhook URL ?

I can't found anywhere in the documentation is specified the restriction for sandbox ,regarding to connection/response timeout or other things differences to production environment.

0 Likes 0 ·
Show more comments

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