Hello, we have Desktop Central Cloud. We are trying to create an automation process for removing computers during decommissioning. We stumbled upon the API. With Postman I can get a token. With powershell I can't get the popup to auth, but whatever. Postman gave me a refresh token, that should be good enough from what i read. However, from powershell, I can't get a refresh token. This would be required for our systems to run autonomously like we intend. Any assistance would be great. Note while this is a query setup, I have tried it as a body instead and get the same error.
$Headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$TokenURL = "https://accounts.zoho.com/oauth/v2/token?refresh_token=$($Refresh_Token)&grant_type=refresh_token&client_id=$($ClientID)&client_secret=$($ClientSecret)&scope=DesktopCentralCloud.restapi.READ,DesktopCentralCloud.restapi.Update&redirect_uri=$($RedirectURI)"
$TokenResponse = Invoke-RestMethod -Uri $CodeURL -Method POST -Headers $Headers