Making a Reddit Bot Account
Contents
Making a Reddit Bot Account#
In using this textbook, you will have opportunities to create and run reddit bots on your own reddit account.
While we have made a fake version of Reddit for you to test all the code in this book, we highly encourage you to make a reddit bot account and try it out for real!
Sign up for Reddit#
https://www.reddit.com/register/
You might want to make a new, separate Reddit account, just for making reddit bots, since you don’t want to accidentally get your main reddit account banned or labeled as a bot.
Note: If you want to make a new account and you already have one, you may need to sign out from your current account, or use a different web browser (e.g., Mozilla, Google Chrome, Microsoft Edge, Safari).
Create Reddit bot “application”#
Once you are logged into Reddit, go to user settings:
In the user settings, go to the Safety & Privacy tab and click the Manage third-party app authorization link at the bottom. This should take you to an apps tab (you can also try going straight there with this link). Click on the bottom button that says “are you a developer? create an app…”
Once you are on the create application page, make up a name for your bot (I chose “class_testing_scripts”), then choose the “scripts” type, fill in a description, and for the redirect uri, use “http://www.example.com/unused/redirect/uri”
Once you are done, you should see the app information, which includes two key values: the client_id and the client_secret. Copy these so that you can use them later to run your bot.
Test your keys#
When you get to chapter 2.3.8 (Demo: Try Running the Reddit Bot!), you can try running the code and replacing the fake special passwords with the ones from your account, and see if you can use the code to post an actual tweet to your account.
Understand Reddit Rules for Bots#
Before you try doing anything too creative with reddit bots, make sure you look over the Reddit API Terms of Use and the Reddit API Rules, that way you don’t get yourself banned.