PSZoom module error

Description
I created a script that will remove users from my corporate zoom account. When testing the script from my laptop, it works great. But when I try to run the script from a server we use for scheduled tasks, I get an error. I’ve installed the same PSZoom module on the server and call it at the top of my script.

Error
Invoke-ZoomRestMethod : The remote server returned an error: (400) Bad Request. Invalid api key or secret.
At C:\Program Files\WindowsPowerShell\Modules\PSZoom\1.15.0.0\Public\Users\Get-ZoomUser.ps1:103 char:25

  • … $response = Invoke-ZoomRestMethod -Uri $request.Uri -Headers ([ref]$H …
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (https://api.zoo…orthepeople.com:) [Write-Error], Invalid api key or secret.
    • FullyQualifiedErrorId : 400,Invoke-ZoomRestMethod

Which App Type (OAuth / Chatbot / JWT / Webhook)?
I’m using a JWT authentication method

Additional context
Import-Module PSZoom
Get-ZoomUser -UserId ‘user@domain.com’ -ApiKey $ApiKey -ApiSecret $ApiSecret

Hi @ajaya,

Which Zoom REST endpoint are you calling in your script (can you share the request URL)? Do you run into the same issue when testing using cURL, Postman, etc.?

Thanks,
Will

I was using the rest zoom endpoint wrapped in the PSZoom power shell module.

I decided not to use it since testing with postman was successful with an extended JW token.

Alex Jaya
Systems Engineer

I see, thanks for confirming!