-
Notifications
You must be signed in to change notification settings - Fork 157
Api all functions
Login: www.reddit.com/api/login/username POSTDATA: user=username&passwd=hunter2 (returns a session cookie) or POSTDATA: api_type=json&user=username&passwd=hunter2 (returns JSON containing a modhash and session cookie)
Vote: www.reddit.com/api/vote cookie required POSTDATA: id=t1_abc1010&dir=1&r=android&uh=f0f0f0f0f0f0f0f0f0f0f0 id is “thing id” of thing you’re voting for. dir = 1, 0, or -1. “direction” of vote. r = subreddit name uh = user modhash
Reply: www.reddit.com/api/reply cookie required POSTDATA: thing_id=t3_b00bs&text=hi+girl&r=test&uh=f0f0f0f0
Edit: www.reddit.com/api/editusertext cookie required POSTDATA: thing_id=t3_12345&text=something&r=test&uh=f0f0f0f0f0
Delete: www.reddit.com/api/del cookie required POSTDATA: id=t3_12345&executed=deleted&r=test&uh=ff0f00f0f0
Submit: www.reddit.com/api/submit The cookie returned form a user logon event MUST be present for this request to work without being forced to do a CAPTCHA. Even so, there is a minimum karma for even a logged in user not to have to do a CAPTCHA. POSTDATA: uh=f0f0f0f0f0f0f0&kind=link&url=www.google.com&sr=test&title=hi+guys&r=test or POSTDATA: uh=f0f0f0f0f0f0&kind=self&sr=test&iden=f0f0ff0f0f0f00&captcha=bsyshv&title=hi+guys&test=wassup+dudes if kind = link, use url=… if kind = self, use text=… Captcha may be required to post. If so, use iden=… and captcha=…
More children [UNUSED]: www.reddit.com/api/morechildren POSTDATA: link_id=t3_abcde&children=c0c0111,c0c0112,c0c0118,c0c0200&depth=4&r=reddit.com&uh=f0f0f0f0f00 Unused because I don’t know how to get the list of children except by scraping. Maybe a separate AJAX call does it.