News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
List of all DeviceID's and MAC's?
Tags: rest api, sdk
Nov 11, 2021 at 11:20am   •   1 replies  •  0 likes
Nate Breeden

I'm using C# with RingCentral's SDK, I'm trying to get a list of all DeviceID's and MAC's, the only way I can see is by making a bunch of calls after pulling an extension list?


My end goal is to locate the users physical desk phone's deviceID using the MAC or IP address.


Is there an easier way to do this than making a ridiculous amount of calls after pulling an extension list?



Thank you

1 Answer
answered on Nov 11, 2021 at 11:44am  

There is a workaround solution in C#. I am not sure why the /device endpoint is not documented. But at least, I can read all devices under an account using this endpoint 'restapi/v1.0/account/~/device'.

Unfortunately, this endpoint is not supported in the .NET SDK (because it is not in the specs). But you can call the raw Get function as shown in the sample code below:

static private async Task read_account_devices()
{
    try
    {
        string endpoint = "restapi/v1.0/account/~/device";
        var response = await rcsdk.Get(endpoint);
        var body = await response.Content.ReadAsStringAsync();
        Console.WriteLine(body);
    }
    catch (Exception ex)
    {
        Console.WriteLine(ex);
    }
}

 0
on Nov 11, 2021 at 1:56pm   •  0 likes

You're awesome, thanks Phong. Using what you gave me I was able to do the following, if I'm being silly and these parameters already exist let me know please - figured it might help someone eventually though.

https://ghostbin.com/FvoZh

on Nov 11, 2021 at 2:49pm   •  1 likes

No, the class object to hold the response does not exist. You did the right thing similar to what I showed you for the answering rules response. Good job!

on Nov 11, 2021 at 4:04pm   •  0 likes

Yes sir, trying to learn from what you've provided for me lol



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us