Is anyone aware of any recent changes to this endpoint? Was working great for months and now all of the sudden am getting 400 responses from it. Noticed that at the very least the actual URL of the documentation above changed, previously it was at: https://marketplace.zoom.us/docs/api-reference/zoom-api/phone/updateuserprofile. Have been searching for a few minutes and as far as I can tell there’s no documentation of any changes.
For reference here’s how I’m calling the API. We’re using the PSZoom repo for PowerShell, and have added the following function to update a given id’s extension. Trying to see if I can maybe find an older version of the API reference to see if the body changed or something.
<#
.SYNOPSIS
Update a Zoom Phone user’s profile.
.PARAMETER UserId
The Phone user ID of the account to be updated
.PARAMETER ExtensionNumber
The extension number of the user. The number must be complete (i.e. site number + short extension)
.PARAMETER SiteId
Unique identifier of the site where the user should be moved or assigned
.OUTPUTS
No output. Can use Passthru switch to pass the UserId as an output.
.LINK
https://marketplace.zoom.us/docs/api-reference/zoom-phone-api/phone/updateuserprofile
.EXAMPLE
Update-ZoomPhoneUserProfile -UserId 'dvader@thesith.com' -ExtensionNumber "1234567890"
#>
function Update-ZoomPhoneUserProfile {
[CmdletBinding()]
Param(
[Parameter(
Mandatory = $True,
ValueFromPipeline = $True,
ValueFromPipelineByPropertyName = $True,
Position = 0
)]
[ValidateLength(1, 128)]
[Alias('Id', 'ids', 'user_id', 'user', 'users', 'userids')]
[string[]]$UserId,
[string]$ExtensionNumber,
[string]$SiteId,
[switch]$PassThru,
[ValidateNotNullOrEmpty()]
[string]$ApiSecret,
[ValidateNotNullOrEmpty()]
[string]$ApiKey
)
begin {
#Generate Header with JWT (JSON Web Token) using the Api Key/Secret
$headers = New-ZoomHeaders -ApiKey $ApiKey -ApiSecret $ApiSecret
}
process {
foreach ($user in $UserId) {
$request = [System.UriBuilder]"https://api.zoom.us/v2/phone/users/$user"
$requestBody = @{
'extension_number' = $ExtensionNumber
'site_id' = $SiteId
}
$requestBody = $requestBody | ConvertTo-Json
$response = Invoke-ZoomRestMethod -Uri $request.Uri -Headers ([ref]$Headers) -Body $requestBody -Method PATCH -ApiKey $ApiKey -ApiSecret $ApiSecret
if (-not $PassThru) {
Write-Output $response
}
}
if ($PassThru) {
Write-Output $UserId
}
}
}