Webhooks & Other API Options

  • 3
  • Idea
  • Updated 6 months ago
  • Under Consideration
RingCentral has very limited API's at this time. I am a customer of RingCentral and our company develops software. I would love to be able to add some features to my companies call flows but the API's just don't allow this. 

To me, the most broad solution would be Webhooks. A Webhook is a URL that has data posted to it after a triggering event. 

Example of Trigger Event for Webhook
  • Incoming Call to a company number
  • Caller has been on hold another 60 seconds
  • Caller is transferred to an extension
  • Call is answered by an extension
  • A new voicemail (or fax) is received by an extension
  • A fax is successfully sent by the system
  • (and there are many more I am sure)
  • A call is disconnected

The data that would be posted would be a JSON object of
  • The ID of the call (to track it throughout the entire call process)
  • Caller ID of the caller 
  • Caller's Location (if available)
  • Timestamp of when the call was first received by the system (so we can track how long they have been waiting on the phone)

From a user standpoint that would allow anybody working on virtually any system connected to the internet to receive notifications of certain events. This would go beyond any specific operating systems or programming language. 

With this information, my server could be monitoring the webhook URL's and I can have my system take actions. For example, I could have a monitor that displays callers that are on hold for my support team so they can see how many callers are on hold, the average hold time, and who has been on hold the longest. 

It would also let me see how fast specific support staff members are at resolving issues. 

This system would also allow me to display account information for customer as my support team answers. 

Ultimately this system would allow me to provide better service by simply specifying webhook URL's on certain events. The sky is the limit. 
Photo of Ben A Eckenroed

Ben A Eckenroed

  • 50 Points

Posted 4 years ago

  • 3
Photo of wes.melton

wes.melton

  • 50 Points
I would love to see this functionality as well. In the short term as a work around, depending on your phone, a lot of Cisco IP phones have somevery limited xml web hooks the phone itself can push when a call is answered, but it's pretty limited. Would love to see RingCentral implement a powerful API like this. Would be incredible for us as a business too.
Photo of Benjamin Dean

Benjamin Dean, Alum

  • 8,642 Points 5k badge 2x thumb
You're both absolutely correct that Webhooks are a valuable addition for being able to receive event notifications. In fact, we're working on that feature for an upcoming release. It is still in development and not ready to launch, but as soon as we have completed development and testing we will make an official announcement on the RingCentral Developer Blog.

In the meantime, the way to handle a few of the use-cases you described is to use the subscribe to notifications for extension events.
Photo of Adam B

Adam B

  • 74 Points
I would love to see this functionality as well.
Photo of John Wang

John Wang, Official Rep

  • 5,496 Points 5k badge 2x thumb
We are looking at implementing webhooks now. If you are interested in more information or participating in our beta program for this, please email me at john.wang@ringcentral.com. Thanks.
(Edited)
Photo of John Wang

John Wang, Official Rep

  • 5,496 Points 5k badge 2x thumb
As a follow up to this thread, we introduced webhooks last year and published an article on the release here:

https://medium.com/ringcentral-developers/ringcentral-webhooks-introduction-8d98e51e350d#.dfdeavzsg
Photo of Benjamin Dean

Benjamin Dean, Alum

  • 8,642 Points 5k badge 2x thumb
I created a sample application which shows how to use RingCentral Webhooks.

https://github.com/bdeanindy/ringcentral-webhook-basics
Photo of Wesley Hunt

Wesley Hunt

  • 100 Points 100 badge 2x thumb
If you want to create a webhook for more than 1 account and extension do we need to create a platform instance for each user and log into that platform instance as the user?

What privileges do we need to create webhook subscriptions for another username and extension than the one you are logged in as? When I try I always gets 403. 

It would not be ideal to hard code everyones username/passwords in the server and maintain access/refresh tokens for them.
Photo of Saadet - Community Support

Saadet - Community Support, Official Rep

  • 96 Points 75 badge 2x thumb
Hey Wesley, I'm not sure of the answer to your question. I would suggest asking our Developers Community - they would most likely have more information for you!
Photo of John Wang

John Wang, Official Rep

  • 5,476 Points 5k badge 2x thumb
When you want to create webhook subscriptions to mulitple accounts, you need to create a UI to allow a user to "link" their account. Linking the account will occur via OAuth 2.0 authorization code grant which uses a RingCentral web UI to handle the password (including SSO) and return an access token to your app. This way, your app never holds the user's credentials.

The user sees that they are linking their accounts and and is presented with a list of permissions they are giving your app your app has permission to access their account, e.g. create a webhook. 

Apps like GitHub, Alexa, Zapier have/support implementations like this.
Photo of Wesley Hunt

Wesley Hunt

  • 100 Points 100 badge 2x thumb
  • Incoming Call to a company number
  • Caller has been on hold another 60 seconds
  • Caller is transferred to an extension
  • Call is answered by an extension
  • A new voicemail (or fax) is received by an extension
  • A fax is successfully sent by the system
  • (and there are many more I am sure)
  • A call is disconnected

#1. If you can't put a presence filter directly on the company number put the filter on a number on an extension that will receive the call behind the company number. 
#2. You get a presence event when a call transitions to 'OnHold', from there you need to create your own timer - do what you will when 60 seconds is passed (there is no support to register a push event for this type of requirement). You can always query the presence data after 60 seconds if you wish.
#3. This is ugly and the way I have overcome it is to have a presence filter for every number that you want to manage. You will see many incoming call webhook notifications (if multiple numbers are behind a queue for instance), then when someone answers you have to manually track that call in your application and associate it to the user that answered.
#4 see #3
#5. See available webhook filters
#6. Don't know - although you can query logs for faxes and such. There may be a webhook filter for this now
#7. Presence filter for call data will get a 'NoCall' push notification when a call ends.
(Edited)