Skip to main content

I have some questions about some API functionality.


1. Is it possible to find a user/extension by searching by a custom field? We are using a custom field to store our company unique assigned ID so t hat we can, hopefully, tie a user/ext in RC to our internal employee ID.

2. Is it possible to add sites/companies into the sandbox? Our company uses sites in production and I would like to test various things in an environment that can more closely mimic prod.

3. Do you have a demo of the API events/notifications system or a sample response that would be sent from that system?

4. The API site for creating an extension doesn’t show what fields are absolutely required. Do you have a list?


If it matters, I am using C# and the ringcentral NuGet package.

1. Is it possible to find a user/extension by searching by a custom field? We are using a custom field to store our company unique assigned ID so t hat we can, hopefully, tie a user/ext in RC to our internal employee ID.

As far as I know, there is no custom field search filter.


2. Is it possible to add sites/companies into the sandbox? Our company uses sites in production and I would like to test various things in an environment that can more closely mimic prod.

Yes, you can open a support ticket and request for this.


3. Do you have a demo of the API events/notifications system or a sample response that would be sent from that system?

What events/notifications?


4. The API site for creating an extension doesn’t show what fields are absolutely required. Do you have a list?

The minimum requirement is a contact object and the type

var params =
contact:
firstName: "
lastName: "
email: "
emailAsLoginName: true/fal

type: "User"
}

the notification I was most interested in was one that would show extension numbers and/or a phone number being changed.


You can add this class to your code. Remember to install the latest RC PubNub SDK.

static private async Task pubnub_notification()
{
try
{
var eventFilters = new[]
{
"/restapi/v1.0/account/~/extension/~"
};

var subscription = new Subscription(rcsdk, eventFilters, message =>
{
Console.WriteLine("Incoming event");
var jsonObj = JObject.Parse(message);
Console.WriteLine(jsonObj["body"]);
});
var subscriptionInfo = await subscription.Subscribe();

Console.WriteLine(subscriptionInfo.id);
Console.WriteLine("Subscribed");
while (true)
{
Console.WriteLine("looping ...");
Thread.Sleep(5000);
}
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
}
// sample event data

{
"extensionId": "17800xxxx
"eventType": "Update"
"hints":[
"AnsweringRules"
]
}

You will get just the event. There will be no info about the change though.


Once the ability to add sites in sandbox is active, how do you add one?


You should get help from the dev support after enabling multiple sandbox accounts


Reply