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()
We just release a new .NET SDK:
https://github.com/ringcentral/ringcentral.netWith 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
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"}]}
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.
Before the SSL and certificate first of all you should have the incoming socket connection.