Zoom Phone API - Update User's Profile suddenly not working

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
        }

    }
}

Hey @jared.pittman,

Thank you for reaching out to the Zoom Developer Forum. I’m not aware of any recent changes to that API but I’m happy to further investigate this. From here, I think I’ll need the full endpoint and JSON request body that you’re using.

In order to provide that, please send an email to developersupport@zoom.us with a link to this thread.

Thanks,
Max

Hey Max, the API is actually now working again without us making any changes on our side.

Not sure what might have changed, but at the very least looks like this question triggered the web team to set up a redirect for https://marketplace.zoom.us/docs/api-reference/zoom-phone-api/phone/updateuserprofile, that old link is working again :slight_smile:

Thanks for your assistance!

Actually looks like the issue is still present today, but was able to find out that it’s due to Zoom thinking that an extension is being assigned via the API is already used when it actually isn’t in our portal. I’ve confirmed that the extensions in question also aren’t assigned to anyone in the trash bin.

Is there any way to check to see if something is miscofigured on the back-end? For the time being I’m going to throw a try/catch block into my code to try the next available extension if the portal returns a 400 until it finds one that isn’t having issues.

Hey @jared.pittman,

Please submit a ticket and include a link to this thread. As well as the request you’re making and the workaround implemented. I’ll use this to reach out to our engineering team.

You can submit a ticket by navigating to our Developer Support Center.

Thanks,
Max

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.