Ryan Carr Posted November 8, 2016 Posted November 8, 2016 I am not sure how to send the API key and data to the post API request. I have tried making a forum and sending it to the API method that calls for a post request. <form action="/api/forums/topics" method="post"> <input type="hidden" name="key" value="XXXXXXXXXXX"> <input type="text" name="forum"><br /> <input type="text" name="author"><br /> <input type="text" name="title"><br /> <input type="text" name="post"><br /> <input type="submit" name="submit" value="Submit"> </form>
Marcher Technologies Posted November 9, 2016 Posted November 9, 2016 On 11/7/2016 at 6:47 PM, Ryan Carr said: I am not sure how to send the API key and data to the post API request. I have tried making a forum and sending it to the API method that calls for a post request. <form action="/api/forums/topics" method="post"> <input type="hidden" name="key" value="XXXXXXXXXXX"> <input type="text" name="forum"><br /> <input type="text" name="author"><br /> <input type="text" name="title"><br /> <input type="text" name="post"><br /> <input type="submit" name="submit" value="Submit"> </form> Point the form at a local controller(php file) that uses the API to actually create the post, and remove the 'key' as an input. Never, ever, evereverever reveal your API key in visible code like that, it opens it up to abuse. One page inspection with debug tools is all one requires to obtain the API key with the form like that.
Ryan Carr Posted November 9, 2016 Author Posted November 9, 2016 Ok thank you. I will report back if anything goes wrong.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.