I could not find a simple example showing how to consume the Reddit API to get the comments for a post. This shows step by step how to authenticate and the endpoints to request.
You need to create an app to get an app id
and secret
.
Go to https://www.reddit.com/prefs/apps and at the bottom of the page under "developed applications" create a new app or view a current one.
If you click "edit" to open the app view you will be able to see the app id
and secret
, these are required for authentication.