question

Jeff Craig avatar image
Jeff Craig asked Rahul G answered

Webhook Incoming Call All Users In Organization

I'm creating an app for my organization that does a handful of customized things that RingCentral does not do. This is my first time to use the RingCentral API and I'm stuck on how to get the Incoming Call webhook to work for all extensions in my organization. I'm using the .NET SDK and right now I have:

var rc = new RestClient(CLIENT_ID, CLIENT_SECRET, SERVER_URL);
await rc.Authorize(USERNAME, EXTENSION, PASSWORD);
await rc.Restapi().Subscription().Post(new CreateSubscriptionRequest
{
     eventFilters = new[] { "/restapi/v1.0/account/~/extension/~/incoming-call-pickup"
     deliveryMode = new NotificationDeliveryModeRequest
     {
         transportType = "WebHook",
         address = IncomingCallWebHookAddress
     }
});


But this seems to only set up the webhook to be fired for events on this one user's extension, even though the user is a Super Admin.

Is it possible to set up this webhook so that it fires each time an incoming call comes in for the over 100 users in our organization? It seems like this would be a nightmare to manage long term unless I can just have the super admin grant permissions for all extensions.

Thanks in advance!

authorizationwebhooksincoming call detail
1 |1000

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

Phong Vu avatar image
Phong Vu answered Jeff Craig edited

Just change the event filter with this:

"/restapi/v1.0/account/~/incoming-call-pickup"

Make sure you login with a super admin extension.

1 comment
1 |1000

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

Jeff Craig avatar image Jeff Craig commented ·

Thanks for the suggestion but this doesn't seem to work. Any idea where I am going wrong?

I authenticate as the super admin and when I try to use this event filter I get:

Content: {"errorCode":"CMN-101","message":"Parameter [eventFilters] value is invalid","errors":[{"errorCode":"CMN-101","message":"Parameter [eventFilters] value is invalid","parameterName":"eventFilters"}],"parameterName":"eventFilters"}

Code used:

await rc.Restapi().Subscription().Post(new CreateSubscriptionRequest
{
   eventFilters = new[] { "/restapi/v1.0/account/~/incoming-call-pickup"},
   deliveryMode = new NotificationDeliveryModeRequest
   {
      transportType = "WebHook",
      address = IncomingCallAddress
   },
});
0 Likes 0 ·
Rahul G avatar image
Rahul G answered

Thanks Phong - Changing to the below worked for me.

"/restapi/v1.0/account/~/incoming-call-pickup"
1 |1000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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