akkarao b avatar image
akkarao b asked Phong Vu answered

How to implement Webhook for Ringcentral app(platform Type Browser based) in java

Hi, we need to use webHooks in our application. My RingCentral app platform type is browser based so it not supporting password flow. But to use webhooks it seems like password flow is mandatory as i go through in api reference.So can you please suggest how to use webhook for platform type browser based.

This is our application Type and permissions.

App Type - Web browser (Javascript)

Access - All RingCentral customers

Available Auth Flows

Auth Code(true)



Refresh token(true)

1 |3000

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

1 Answer

Phong Vu avatar image
Phong Vu answered

Check out and combine these 2 dev guide examples:

  1. Authorization flow
  2. Webhooks

See the sample code below where I added the "/subscribe" case to handle webhook subscription.

case "/test":
  String api = request.getParameter("api");
  String result = "";
  switch (api) {
    case "extension":
      result = JSON.toJSONString(rc.restapi().account().extension().list(), SerializerFeature.PrettyFormat);
    case "extension-call-log":
      result = JSON.toJSONString(rc.restapi().account().extension().calllog().list(), SerializerFeature.PrettyFormat);
    case "account-call-log":
      result = JSON.toJSONString(rc.restapi().account().calllog().list(), SerializerFeature.PrettyFormat);
  response.getWriter().println("<pre>" + result + "</pre>");
case "/subscribe":
  String result = ""; 
  var eventFilters = new String[]{
  CreateSubscriptionRequest createSubscriptionRequest = new CreateSubscriptionRequest()
      .deliveryMode( new NotificationDeliveryModeRequest()
  var result = rc.restapi().subscription().post(createSubscriptionRequest);

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