Read time ~ 3 coffees ☕☕☕

I recently started working on a project which allows Reddit users to schedule posts for multiple subreddits. To post something on behalf of the user, many services support the OAuth2 protocol for authorization. Reddit does too. Reddit supports 3 types of applications under this flow. The one we are interested in is the web app one. Refer to this doc if you are confused about choosing the right type.

Create an application

If you have created an application in Reddit, then you can skip this step.

Head over to https://www.reddit.com/prefs/apps

new_app_create.jpg

Click on the button to create a new app.

Screenshot 2022-01-20 at 23-41-13 preferences (reddit com).png

Fill in the details and hit create an app. Few things to note.

  1. The app is of type web type.
  2. Redirect URI is important so please make a note of it before saving. I generally put something like http://localhost:3000/login/callback there.

Congrats, you successfully created an application. 🎉