2. Ring Central Webhook
Ring central platform provides push notifications through
webhook.
In order to receive Events from Ringcentral. You need to have
1. Webserver always running
2. It should have TLS/SSL enabled
3. It should subscribe to specific endpoint so that validation-token will
be passed in headers.
3. Webhook Setup
You should create a subscription with webhook by making a post
to the subscription endpoint
Method Endpoint Description
POST v1.0/subscription Create a webhook subscription
RestClient rc = new RestClient(RINGCENTRAL_CLIENTID, RINGCENTRAL_CLIENTSECRET, RINGCENTRAL_SERVER);
rc.authorize(RINGCENTRAL_USERNAME, RINGCENTRAL_EXTENSION, RINGCENTRAL_PASSWORD);
String[] eventFilters = new String[]{"/restapi/v1.0/account/~/extension/~/message-store/instant?type=SMS"};
CreateSubscriptionRequest createSubscriptionRequest = new CreateSubscriptionRequest()
.eventFilters(eventFilters)
.deliveryMode( new NotificationDeliveryModeRequest()
.transportType("WebHook")
.address(DELIVERY_ADDRESS) // Provide your webserver URL
);
SubscriptionInfo result = rc.restapi().subscription().post(createSubscriptionRequest);