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
How do I resolve a HTTP Code 500 with CMN-203 Internal Server Error when subscribing to WebHook?
Tags: rest api
Nov 9, 2019 at 9:44pm   •   3 replies  •  0 likes
Rick McGrath

Using Java. Successfully placed outbound call and read call log. Tutorials have been great.

Using ringcentral-1.0.0-beta10.jar (where RestClient line 304 throws the exception)

Here is the code I ran (from your example pages):

public void setupWebHook() throws RestException, IOException{


RestClient rc = new RestClient(RINGCENTRAL_CLIENTID,

RINGCENTRAL_CLIENTSECRET, RINGCENTRAL_SERVER);

rc.authorize(RINGCENTRAL_USERNAME, RINGCENTRAL_EXTENSION, RINGCENTRAL_PASSWORD);


List<String> eventFilterList = new ArrayList<>();

eventFilterList.add("/restapi/v1.0/account/~/extension/~/presence?detailedTelephonyState=true&sipData=true");

eventFilterList.add("/restapi/v1.0/account/~/extension/~/message-store");

eventFilterList.add("/restapi/v1.0/account/~/extension/~/presence/line");

eventFilterList.add("/restapi/v1.0/account/~/extension");


CreateSubscriptionRequest createSubscriptionRequest = new CreateSubscriptionRequest()

.eventFilters(eventFilterList.toArray(new String[0]))

.deliveryMode( new NotificationDeliveryModeRequest()

.transportType("WebHook")

.address(WEBHOOK_ADDRESS)

);

SubscriptionInfo result = rc.restapi().subscription().post(createSubscriptionRequest);

System.out.println(result.id);

System.out.println("WebHook Ready");


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

I can see that my webhook was hit by RingCentral, and it replied with Validation-Token

an exception was thrown at the post line.

HTTP Response

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

status code: 500

Server: nginx

Date: Sun, 10 Nov 2019 05:01:34 GMT

Content-Type: application/json;charset=UTF-8

Transfer-Encoding: chunked

Connection: keep-alive

LocalHostInfo: 10.28.28.26__17239@sjc11-c01-csg01.devtest.ringcentral.com

RCRequestId: 2afd74ac-0377-11ea-90fa-005056bbcdd9

X-Rate-Limit-Group: medium

X-Rate-Limit-Limit: 40

X-Rate-Limit-Remaining: 39

X-Rate-Limit-Window: 60

RoutingKey: SJC11P01

{"errorCode":"CMN-203","message":"Internal Server Error","errors":[{"errorCode":"CMN-203","message":"Internal Server Error"}]}

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

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

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

at com.ringcentral.paths.restapi.subscription.Index.post(Index.kt:32)

at CallOutMain.setupWebHook(CallOutMain.java:67)


at CallOutMain.main(CallOutMain.java:27)


3 Answers
answered on Nov 11, 2019 at 5:55am  

When I'm on a phone call can I take notes and have them attach to that number? So when the customer calls again all the information will populate on the screen.


 0
answered on Nov 10, 2019 at 1:57am  

If you check here : https://ringcentral-faq.readthedocs.io/en/latest/errors/

and https://developers.ringcentral.com/api-reference/Error-Codes

CMN-203Internal Server Error

is due to "The server failed to run an apparently valid request "


 0
answered on Nov 9, 2019 at 10:47pm  

Could you please submit a support ticket with the necessary information like (API Request and API response including headers preferably)?

Meanwhile, could you try subscribing to Extension and Message Store Event Filters and test the results?


 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