I'm currently trying to get a users saved posts using the JRAW reddit api wrapper using this code:
val helper = App.get().accountHelper
val paginator = helper.reddit.me()
.history("saved")
.build()
val saved = paginator.next()
Which always results in a 403 - Forbidden. I log in and get the oauth token by using JRAW-Android new user example then switch to the user accountHelper.switchToUser(userName)
which shows the account is authenticated..
Any ideas why i'm not able to authenticate?
Didn't realize Reddit had scopes. I had to add the history
scope to the strings array when requesting getAuthorizationUrl
String[] scopes = new String[]{ "read", "identity", "account", "save", "history"};
String authUrl = helper.getAuthorizationUrl(requestRefreshToken, useMobileSite, scopes);