Tweepy Cheatsheet

Tweepy Cheatsheet

Create a Reddit bot is fun and first we need to create a reddit app, to do that go to https://www.reddit.com/prefs/apps and create a new app.

_jx2Qp8ViotEkg

# Safe for reading complex and strong password
username=InfoSecRavindra
password=$(cat password.txt)
client_id=76YxceqHhof-Kw
client_secret=4Z3gDltrI9ku9SXQR_OzONXVQNs

curl -X POST -d "grant_type=password" -d "username=$username" -d "password=$password" --user "$client_id:$client_secret" https://www.reddit.com/api/v1/access_token

curl -X POST -d "grant_type=password&username=$username&password=$password" --user "$client_secret:$client_id" https://www.reddit.com/api/v1/access_token

{ “access_token”: “-UgV7HL3R4k0D3hucqlk8f4hhUdc”, “token_type”: “bearer”, “expires_in”: 3600, “scope”: “*” }

curl -H “Authorization: bearer -UgV7HL3R4k0D3hucqlk8f4hhUdc” -A “RawBot/0.1 by InfoSecRavindra” https://oauth.reddit.com/api/v1/me


Original:  Updated: