This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
7
Documentation for the `/api/report` endpoint and, especially, valid values for parameters
Post Body
There's precious-little documentation on valid input for the /api/report
endpoint. The endpoint accepts the following parameters:
additional_info: a string no longer than 2000 characters
custom_text: a string no longer than 2000 characters
other_reason: a string no longer than 100 characters
reason: a string no longer than 100 characters
rule_reason: a string no longer than 100 characters
site_reason: a string no longer than 100 characters
- What's the difference between
additional_info
andcustom_text
? - Does
site_reason
expect the full report reason string (e.g. "It's targeted harassment at me") or the constant form (e.g. "HARASSMENT_AT_ME")? - If the latter, then what does
rule_reason
expect? Since rules are user-defined, there will not be a predefined constant like forsite_rule
. - If we're using
site_reason
andrule_reason
then what does plainreason
do? - What's
other_reason
for? Is it for freeform reports? If so, what docustom_text
andadditional_info
do?
Bonus question: what's the proper way to handle complaint
-type reports? Some site-wide rules have additional parameters (taken from /r/subreddit/about/rules.json
under the site_rules_flow
object):
{
"complaintButtonText": "File a complaint",
"complaintUrl": "https://www.reddit.com/api/report_redirect?thing=%(thing)s&reason_code=NETZDG&feature=from_r2",
"complaintPageTitle": "File a complaint?",
"reasonText": "Report this content under NetzDG",
"reasonTextToShow": "Report this content under NetzDG",
"fileComplaint": true,
"complaintPrompt": "This reporting procedure is only available for people in Germany. If you are in Germany and would like to report this content under the German Netzwerkdurchsetzungsgesetz (NetzDG) law you may file a complaint by clicking the link below."
},
{
"usernamesInputTitle": "Username",
"reasonTextToShow": "Someone is considering suicide or serious self-harm.",
"canSpecifyUsernames": true,
"reasonText": "Someone is considering suicide or serious self-harm.",
"requestCrisisSupport": true,
"oneUsername": true
}
Is the proper way to:
- Send
reasonText
like a regular report and ignore all the other special fields; or - Send
reasonText
like a regular report, ignore all other fields, AND redirect the user to thecomplaintUrl
; - Send
reasonText
like a regular report and include all other fields (such asfileComplaint
orrequestCrisisSupport
); or - Send
reasonText
and the other parameters to thecomplaintUrl
instead of the default/api/report
endpoint?
EDIT: Code formatting
Author
Account Strength
100%
Account Age
10 years
Verified Email
Yes
Verified Flair
No
Total Karma
42,322
Link Karma
1,947
Comment Karma
39,528
Profile updated: 3 days ago
Subreddit
Post Details
We try to extract some basic information from the post title. This is not
always successful or accurate, please use your best judgement and compare
these values to the post title and body for confirmation.
- Posted
- 2 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/redditdev/c...