trstringer / redditwatcher

:radio: Reddit streaming CLI
19 stars 0 forks source link

Remove requirement to supply reddit credentials #1

Open michael-lazar opened 7 years ago

michael-lazar commented 7 years ago

If you use the "Installed Application" oauth type, you can avoid forcing users to register their own reddit app in order to use your script. This oauth type is one of the most flexible, but it's very poorly documented by both Reddit and PRAW. It goes something like this:

reddit = praw.Reddit(
    client_id='redditwatcher_client_id',
    client_secret=None,
    user_agent='redditwatcher'
)

Now anybody can run your script and no secret keys are exposed!

http://praw.readthedocs.io/en/latest/getting_started/authentication.html#installed-application

trstringer commented 7 years ago

Good idea, thanks!