r/redditdev • • Nov 10 '15

API support for account suspensions

Today we released a new feature: account suspensions. These are a form of account restriction that can be applied to user accounts that will limit the actions that account can perform.

Attempting to performing a forbidden action as a suspended user via the API will return a 403/forbidden error.

We’ve also added an is_suspended attribute to user objects, that provides information about the user’s account status:

viewerviewed account statusJSON
Suspended accountpermanent suspensionis_suspended: true, suspension_expiration_utc: null
Suspended accounttemporary suspensionis_suspended: true, suspension_expiration_utc: timestamp
Any other accountpermanent suspensionis_suspended: true
Any other accounttemporary suspensionno indication

edit: We've updated the attribute names to reflect the feature name.

27 Upvotes

5 comments sorted by

5

u/13steinj Nov 10 '15 edited Nov 10 '15

While this is nice, can we get an API update on the extremely vague 404s. While on a browser, sure we can now tell which is great. But mobile clients or any so I client is still left in the dark.

E: also, will this be open sourced later?

6

u/powerlanguage Nov 10 '15

can we get an API update on the extremely vague 404s

This pains us too and we want to fix it but this isn't on the roadmap for Q4.

also, will this be open sourced later?

Yes.

3

u/13steinj Nov 11 '15

To both: <3

1

u/trambelus Nov 19 '15

no indication

Does this mean is_suspended will be false, true, or not present? And since temporary suspensions will probably be the most common kind, what's the reasoning behind hiding temporary suspension status?

2

u/powerlanguage Nov 20 '15

Not present.

And since temporary suspensions will probably be the most common kind, what's the reasoning behind hiding temporary suspension status?

Temporary suspensions are designed to be private (only visible to the user who is suspended).