Skip to main content
The First Step
March 30, 2022
Question

Is there an API endpoint that contains Direct Number for an extension from RingCentral?

I am looking at the extensions API and I see a businessPhone in the payload. It turns out that this is the best contact number and we do not give most users the ability to update this field. We need to be able to access the direct number assigned to them in RingCentral. Can that be found in an API? The extensions API does provide us with the additional information we need, but I do not see the direct phone number.

    3 replies

    jsmith141The First StepAuthor
    The First Step
    March 30, 2022

    I think I have found the API endpoint I am looking for

    https://developers.ringcentral.com/api-reference/Phone-Numbers/listExtensionPhoneNumbers


    but this doesnt give me the result set I expect, even when I add the filter below, I still get multiple records back for just one extension ID. Any help anyone could provide would be greatly appreciated?

    usageType=DirectNumber
    PhongVu
    Community Manager
    Community Manager
    March 30, 2022

    Based on your own comment, you want to read direct number of all extensions under your account, right? If that is what you expected, use the account phone number endpoint.

    var endpoint = `/restapi/v1.0/account/~/phone-number` 
    var params = {
            usageType: [ "DirectNumber" ]
            }
    
    jsmith141The First StepAuthor
    The First Step
    March 31, 2022

    Well no what I need comes from the extensions endpoint. Unfortunately, the phone number there, labeled businessPhone, is nothing but the best contact phone number, which is blank for most of our records. I thought it was the direct RingCentral number for that extension. Since that is not the case, I posted this question, but soon after found the endpoint reference page that I listed in my comment, which pulls phone numbers for a given extension id. I then added the uri parameter to limit the results to "DirectNumber", but I am still getting multiple phone numbers for a single extensionId?