News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Can't create webhook subscription in production mode
Tags: sdk
Mar 18, 2019 at 11:03pm   •   5 replies  •  0 likes
matt-resmer

Hi Guys,


I've switched my application from development to production and changed appropriate credentials ... but I'm finding the WebHook subscription fails now even though it's exactly the same url that worked fine in development


I know I'm connecting to the production ring central url properly because I can establish a connection with the new credentials, receive an access token, get a list of the account's extensions etc


But, when I try and create my subscription, I get a 400 Bad Request result with exactly the same code, callback url that worked fine before


Is there something different that needs to be done with WebHooks in production mode?


Thanks for the help.


Matt

5 Answers
answered on Mar 19, 2019 at 7:36pm  

Replied to you via email. There are issues with the webhook uri.


Could not get any response

There was an error connecting to <url omitted>.

Why this might have happened:

  • The server couldn't send a response:


  • Self-signed SSL certificates are being blocked:


  • Proxy configured incorrectly


  • Request timeout:



I think it is an SSL issue.

Sandbox works because sandbox doesn't require SSL at all.



 0
on Apr 20, 2022 at 8:36am   •  0 likes

Before the SSL and certificate first of all you should have the incoming socket connection.

answered on Mar 19, 2019 at 7:21pm  
Fantastic, thanks Tyler ... I can see now that the RingCentral server seems to think my Web Hook url is unreachable (exception contents below). The thing is though, this same code/url works perfectly in the development sandbox.

Do Web Hook url domains need to be whitelisted in settings somewhere or something? I can hit that endpoint from a browser external to the domain too and it works fine ... so the endpoint's defintely live

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

 0
answered on Mar 19, 2019 at 4:29pm  
We just release a new .NET SDK: https://github.com/ringcentral/ringcentral.net
With this new SDK it should be much easier to debug.

If you continued to use the old SDK, here is the code to print response body: https://github.com/ringcentral/ringcentral-csharp-client#exception-handling

 0
answered on Mar 19, 2019 at 2:59pm  
Thanks for replying Tyler.

I'm using your RestClient in csharp to do it. I don't receive any error from the Post method. I just get a 400 Bad Request exception and the contents of the exception don't give me any clue why ...

Flurl.Http.FlurlHttpException: Call failed with status code 400 (Bad Request): POST https://platform.ringcentral.com/restapi/v1.0/subscription
   at Flurl.Http.FlurlRequest.<HandleExceptionAsync>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Flurl.Http.FlurlRequest.<SendAsync>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Flurl.Http.FlurlRequest.<SendAsync>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at RingCentral.RestClient.<Post>d__9'1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter'1.GetResult()

 0
answered on Mar 18, 2019 at 11:32pm  
"400 Bad Request result"

Please read the response body out. The body contains detailed explanation about the failure reason

 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us