Phone API Request ; Query Available numbers present within account

Within Zoom Phone API (documented here > https://marketplace.zoom.us/docs/api-reference/zoom-api/phone/listaccountphonenumbers ) able to query available numbers per site.

Hey @snimmo, thanks for posting and using Zoom!

Have you used the type=unassigned query param? That will include numbers that have not been assigned (in other words, available) to your account.

Thanks,
Tommy

@tommy, thanks for the answer there however I think I need to clarify my ask now;

So I’m running the following;

Invoke-RestMethod ‘https://api.zoom.us/v2/phone/numbers?page_size=300’ -Headers @{‘Authorization’ = “Bearer $Accesstoken”} -Method Get -ContentType ‘application/json’

Within the response I’m getting back (note the page_size);

image

Also, is there a way (or to be added) to query by site so that the page return is smaller depending on the site size?

Hey @snimmo,

I was able to reproduce the page_size max being 100 and not 300. We are looking into this.

Can you explain further, I don’t understand?

When you say “site” do you mean Zoom account?

Thanks,
Tommy

@tommy,

Within Zoom phone UI, you have “Site” listed (in a follow up post since it doesn’t like multiple images in a post);

Now, those sites translate out to a GUID (using my account as the example);

image

Since we have multiple “sites” (as in physical offices), it’ll help to know how many numbers are left under that particular site and would reduce the size of the call since we’re not looking for allll numbers in the account, just only at a site.

Other screenshot;

Hey @snimmo, the max page_size is 100, we have updated our documentation.

As for the site, thank you for the clarification :slight_smile:

Adding a site query param would be a great enhancement to the GET /phone/numbers endpoint. I will add this as a feature request.

Not sure if this helps, but we have a GET /phone/sites/{siteId} endpoint.

You can track our releases here to see when the site query param gets released.

Thanks,
Tommy

@tommy, thanks for updating the docs.

About the site query, we do get the name of the site (kudos) and it matches what we would see from the phone management GUI (also hurray). But the only number listed is the auto-receptionist (which is nice, but not sure if useful right now at least).

So to query available numbers by their site_id value would be amazing to have. Also for the calling plans to site assignment, looking over the docs I’m not entirely sure how to validate E911 settings either and/or there isn’t anything in the user profile that states that (maybe defined somewhere within the site?). I’ll admit I haven’t dug much into it but figured it wouldn’t hurt to ask.

1 Like

Happy to help @snimmo, thanks for pointing this out to us! :slight_smile:

As for the Zoom Phone E911 settings, can you elaborate on this?

Do you mean the emergency address settings?

Thanks,
Tommy

@tommy, yes that’s it.

Hey @snimmo,

Have you seen our “Setting Up Emergency Addresses and Emergency Calling” page?

Let me know if this helps!

Thanks,
Tommy

@tommy, that looks good. I think I’m over thinking it just a bit.

In the meantime, I’ll keep an eye on the site query param release but continue to see if I can make things work as they stand currently.

Also, on the GET /phone/numbers endpoint, I don’t see where the next_page_token is supplied after running this (or if supplied before, where does one get it?);

Invoke-RestMethod ‘https://api.zoom.us/v2/phone/numbers?page_size=100’ -Headers @{‘Authorization’ = “Bearer $Accesstoken”} -Method Get -ContentType ‘application/json’

image

1 Like

Hey @snimmo,

Can you try supplying the following query param for pagination?

page_number=2 I think our docs might be wrong.

https://api.zoom.us/v2/phone/numbers?page_size=100&page_number=2

Thanks,
Tommy

@tommy

It just displays the second page of results meaning I’d have to get the number of pages and then loop through them.

So, in my case, I’d have to run my query 30 times (one to get the number of pages, then loop another 29)

Hey @snimmo,

The page_count tells you how many pages of page_size (100) there are.

So yes to get all of the data, you would have to make 29 requests.

Thanks,
Tommy

@tommy,

That’s a bit depressing but I guess it is what it is currently.

In that event, I’ll keep an eye on the releases for said API and any/all recaps from our Account Rep.

So, for the time being, I think we’re good to go in regards to get started on testing.

Hey @snimmo!

Yes stay up to date on the releases :slight_smile:

Let us know if you have other questions while testing!

Thanks,
Tommy

Hey @snimmo,

We are updating the GET /phone/numbers endpoint and GET /phone/sites/{siteId} endpoint to fix a bug. They will be re-released in November/December. In the meantime please use the phone APIs that you see listed in our docs.

Thanks, and sorry for the inconvenience.

Hey @tommy,

Both GET pages 404.

1 Like

Hey @snimmo,

Yes we removed them from our docs until we fix the bug.

Thanks,
Tommy