HIVE API 2 Forbidden

I have been trying to use the api, but have not gotten it to work. The nim code below outputs 403 Forbidden. Any ideas as to why it isn’t working?

let client = newHttpClient()
client.headers = newHttpHeaders({ “Content-Type”: “application/json” })
let body = %*{
“login”: “my_login”, “password” : “my_password”
}
let response = client.request(“https://api2.hiveos.farm/api/v2/auth/login”, httpMethod = HttpPost, body = $body)
echo response.status

I tested the api on the webpage Build, Collaborate & Integrate APIs | SwaggerHub

I got the same error there so it doesn’t seem that my code is the problem. Is anyone else unable to access their account from the api?

I have the same issue where my code is running locally while checking if a farm is online but once deployed to AWS I get the 403 forbidden to my request. It’s the same exact code.

My best guesses were a possible linkage to api key and successful hiveos.farm logins but that didn’t work.

I am wondering if it’s an ip ban but I whitelisted that AWS ip in the account settings and no go.

I’m going to try and change the ip to see if maybe I ran some bad tests that got it banned.

I also can’t run their swagger.

use case
I’m checking if farm is online and flipping a power switch off then on if not to hard reset the server. I’ve been having an issue with the server crashing when a card goes down and watch dog can’t reset it because it freezes.

More to follow…

I have a same issue, I implemented almost the same solution for the the same problem as yours. did you get a solution eventually ?

No and support was super rude. They said they don’t support custom development, even though I was referring to their API blacklisting or whatever is going on. Then when following up they asked if I read the previous email. lol… anyway I’m running locally using a scheduled job in laravel, unfortunately.

This topic was automatically closed 416 days after the last reply. New replies are no longer allowed.