Hi Everyone
I’m new to the API. guess im doing something wrong related to authentication. I can query through postman without any issues using my key but no luck with the below code :
Here is what Im tryin to run through PS but I always get an “(401) Unauthorized.” error message
$headers=@{
Authorization="MyAccessKeyStringhere";
Content='application/json'
}
$uri = "https://console.automox.com/api/reports/prepatch"
$result = Invoke-restmethod -Uri $uri -Headers $headers -method get
$result | select -expandproperty profile |select name
Thanks a lot for any help.
Diego