Question

API Get Extension details don't have businessPhone for users

  • 28 January 2020
  • 1 reply
  • 371 views

I created a C# console application to access the RingCentral API using the RingCentral SDK.

With this application, I am pulling a list of calls, and then I pull a list of users, and I import that stuff into our data warehouse for analysis and reporting.

However, when I pull the user records via the [Get Extension] (https://developers.ringcentral.com/api-reference/User-Settings/readExtension), my list of users don't have phone numbers. They should have a phone number, as most of them have a direct number that their clients can reach them at. How do I go about to get the direct numbers of my users via the API? It seems as if the "businessPhone" attribute is not populated. Even when I test it against my account, it's blank.

It seems to me that I will need to pull the [Get Company Phone Numbers] (https://developers.ringcentral.com/api-reference/Phone-Numbers/listAccountPhoneNumbers) and then match the extension/id to that of the extension/id of my user table to get what I want. Basically more steps that I'll have to build out into my application and in the database... why doesn't the GetExtension pull this information by default??


1 reply

Userlevel 1

After you get a list of extensions, parse the extension id of each extension then call this endpoint to get a list of that extension's phone numbers.

HTTP GET /restapi/v1.0/account/{accountId}/extension/{extensionId}/phone-number

https://github.com/ringcentral/RingCentral.Net/blob/master/samples.md#get-extension-phone-number-list

Reply