Hi, My developer tried to connect to API and got an error from the power shell script. He could connect from Postman, browser Chrome, and Firefox, but IE failed the same as Power Shell. Do you have any idea what is wrong?
[1:16 PM] Alex Seymour
$response = Invoke-RestMethod 'https://api.mypurecloud.de/api/v2/billing/reports/billableusage?startDate=2023-12-01T00:00:00Z&endDate=2023-12-02T00:00:00Z' -Method 'GET' -Headers $headers
$response | ConvertTo-Json
Invoke-RestMethod : The underlying connection was closed: An unexpected error occurred on a send.
At line:6 char:13
+ $response = Invoke-RestMethod 'https://api.mypurecloud.de/api/v2/bill ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
#Integrations------------------------------
Robert Klusek
ISS World Services A_S
------------------------------