This may be a shot in the dark, but when I ran into this in the past when querying API endpoints and got a similar error I did some research and found an article that suggested to add a User-Agent header, to trick the endpoint to think it was a web browser asking for the response.
I use PowerShell to build my API scripts, here is how I set the headers. Maybe you can add a new "User-Agent" header and use the highlighted property shown in the screenshot below.

Here is the text for you to copy: "User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12"
------------------------------
Jose Carlos Albor
Genesys - Employees
------------------------------