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