Forum Discussion
Anonymous
6 years agoNot applicable
API - Keyblocker
Hello,
I am trying to run a powershell script to call the API for our ticket system, and then post hit to PowerBI with a foreach loop for every ticket, total is about 17k tickets.
This is the message I am recieving when trying to my script.
Invoke-RestMethod : {"error":{"message":"The request was blocked by KeyBlocker "}}
At line:9 char:1
+ Invoke-RestMethod -Method Post -Uri "$endpoint" -Body (ConvertTo-Json ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommandHas anyone seen this, and is there a workaround?
6 Replies
- JayendranSolution Sage
Hi Anonymous ,
Are you invoking this behind any corporate firewall ?
Also make sure that you have run this using TLS 1.2 in your script
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
- AnonymousNot applicable
Sorry for the late reply, I solved this by putting every ticket into one foreach loop.
- AnonymousNot applicable
Can you please share with us a little bit more details on the workaround you've used?