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