I created private app with full scopt and got the API Key
I want to disable user using script and using following script to access hubspot
$headers = @{
"Authorization" = "Bearer apikey"
}
# Replace '123' with the actual ownerId you want to update.
$ownerId = "xxxxxxxxxxxx"
# Construct the URL with the ownerId parameter in the path.
$url = "https://api.hubapi.com/owners/v2/owners/update/xxxxxxxxxx"
$response = Invoke-RestMethod -Uri $url -Headers $headers -Method Put
but I get error message
Invoke-RestMethod : The remote server returned an error: (404) Not Found.
At line:11 char:13
+ $response = Invoke-RestMethod -Uri $url -Headers $headers -Method Put
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Can anyone help me to reosolve the issue