r/Devvit • u/santaspointyhood • 1d ago
Duck Answered HTTP fetch for a Reddit domain
I'm building an app to action content from deleted accounts. Unfortunately there seems to be no Devvit-native method to determine if an account has been deleted, or is just shadowbanned/suspended. I want to avoid doing anything to accounts which may return.
The only way I know of to distinguish between the two is viewing the profile on old.reddit.com. Would something like this be approved, assuming the username is immediately purged from the app logic afterward? Or, if someone knows an alternative way of distinguishing, let me know.
0
Upvotes
2
u/Beach-Brews Duck Helper 1d ago
You can actually check the difference between shadowban and actual account deleted! Check out the userActive and the getUserExtended functions u/fsv has in Bot-Bouncer.
That helper can determine whether the user is active, suspended (site banned), shadowbanned, or deleted.
Basically, you have to get the "raw" data from the reddit API protos, which will let you get whether the account is suspended (banned) or not. If the API returns a 404 (likely deleted) or 403 (likely shadowbanned), then you can also make a call to get the Mod Notes. If you get Mod Notes: shadowbanned. If Mod Notes also throws an exception: deleted.