You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/capabilities/server/userActions.mdx
+51-26Lines changed: 51 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
importTabsfrom'@theme/Tabs';
2
2
importTabItemfrom'@theme/TabItem';
3
3
4
-
# User actions
4
+
# User Actions
5
5
6
6
User actions allow your app to submit posts, submit comments, and subscribe to the current subreddit on behalf of the logged in user. These actions occur on the logged in user's account instead of the app account. This enables stronger user engagement while ensuring user control and transparency.
7
7
@@ -14,12 +14,10 @@ By default, apps make posts or comments using their associated app account. With
14
14
- Create posts or comments on behalf of the user (from the post UI, a form, or a menu action)
15
15
- Subscribe the user to the current subreddit
16
16
17
-
### Unavailable actions
18
-
19
17
Some actions are not available to apps to prevent abuse and maintain platform integrity:
20
18
21
-
-**Voting** - Apps cannot upvote or downvote posts or comments, either as the app account or on behalf of the logged-in user
22
-
-**Following/friending users** - Apps cannot follow users (on reddit.com) or add friends (on Old Reddit), either as the app account or on behalf of the logged-in user
19
+
- Apps cannot upvote or downvote posts or comments, either as the app account or on behalf of the logged-in user
20
+
- Apps cannot follow users (on reddit.com) or add friends (on old.reddit.com), either as the app account or on behalf of the logged-in user
23
21
24
22
---
25
23
@@ -30,23 +28,14 @@ To ensure a positive user experience and compliance with Reddit policies:
30
28
31
29
-**Always ask permission:** Your app must always inform users before posting, commenting, or subscribing on their behalf. This can only happen on an explicit manual action, e.g. from a button.
32
30
-**No automated actions:** Users must explicitly opt-in to the app acting on their behalf. Do not mislead or surprise users.
33
-
-**Establish a reporting flow:** Ensure `userGeneratedContent` is correctly setfor posts submitted on behalf of the user.
34
-
-**Do not gate functionality behind subscribing:** Users should not be made to subscribe to the current subreddit to access any part of your app.
35
-
-**Remember the human:** Follow Reddit's safety and compliance guidelines for user-generated content.
31
+
-**Establish a reporting flow:** Ensure `userGeneratedContent` is correctly setfor posts submitted on behalf of the user.
32
+
-**Do not gate any functionality:** Users should not be made or encouraged to post, comment, or subscribe to continue using your app.
33
+
-**Remember the human:** Follow Reddit's safety and compliance guidelines for user-generated content. Do not create spam-like content or poor user experiences in pursuit of engagement.
36
34
37
35
:::note
38
36
Apps using user actions must follow these requirements to be approved.
39
37
:::
40
38
41
-
---
42
-
43
-
## How it works
44
-
45
-
-**Unapproved/playtest apps:**
46
-
-`runAs: 'USER'` will operate from the app account unless the app owner takes the action.
47
-
- User actions taken by the app owner will be attributed to the app owner's username.
48
-
-**Approved apps:**
49
-
- After publishing and approval, `runAs: 'USER'` will operate on behalf of the user for all users.
50
39
51
40
---
52
41
@@ -66,28 +55,30 @@ To enable user actions, add the required permissions to your `devvit.json`:
66
55
}
67
56
```
68
57
69
-
After enabling, you can call certain Reddit APIs on behalf of the user by passing the option `runAs: 'USER'`.
70
-
71
-
Currently, the following APIs support this option:
58
+
After enabling, you can call certain Reddit APIs on behalf of the user by passing the option `runAs: 'USER'`. The following APIs support this option:
For user privacy there is no API to check if the user is already subscribed to the current subreddit. You may want to store the subscription state in Redis to provide contextually aware UI.
203
+
204
+
---
205
+
206
+
## Adding user actions to games
207
+
208
+
### End-of-game actions
209
+
210
+
✅ An example of a clear end-of-game layout:
211
+
212
+
-`Play Again`
213
+
-`Comment My Score`
214
+
-`Subscribe to r/your_subreddit`
215
+
216
+
This example keeps each action separate and straightforward for the user. Playing again, commenting, and subscribing are distinct decisions and are therefore presented as distinct actions.
217
+
218
+
❌ An example of an unclear end-of-game layout:
219
+
220
+
-`Play Again and Subscribe`
221
+
-`Post Score to Play Next Level`
222
+
-`Comment & Continue`
223
+
224
+
This example mixes intention and is confusing for the user. Apps like this that merge functionality (e.g. playing again) with user actions (e.g. subscribing or commenting) will be rejected during review.
225
+
226
+
### Commenting scores
227
+
228
+
✅ The required pattern for commenting scores is:
229
+
230
+
- Commenting after explicit manual action (e.g. from a button)
231
+
- Commenting by the user (not the app account)
232
+
- Commenting as a reply to a single stickied comment
233
+
234
+
This avoids surprising the user, enables a reporting flow, and allows the user to easily delete their score comment. Replying to a stickied comment keeps this repetitive content with low discussion value out of the way, in an area that needs to be expanded to view.
235
+
236
+
If offering a way for the user to add a custom message to their score, the comment can be posted as a top-level comment. This prioritizes human discussion and creates a more engaging comment section.
Copy file name to clipboardExpand all lines: versioned_docs/version-0.12/capabilities/server/userActions.mdx
+51-26Lines changed: 51 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
importTabsfrom'@theme/Tabs';
2
2
importTabItemfrom'@theme/TabItem';
3
3
4
-
# User actions
4
+
# User Actions
5
5
6
6
User actions allow your app to submit posts, submit comments, and subscribe to the current subreddit on behalf of the logged in user. These actions occur on the logged in user's account instead of the app account. This enables stronger user engagement while ensuring user control and transparency.
7
7
@@ -14,12 +14,10 @@ By default, apps make posts or comments using their associated app account. With
14
14
- Create posts or comments on behalf of the user (from the post UI, a form, or a menu action)
15
15
- Subscribe the user to the current subreddit
16
16
17
-
### Unavailable actions
18
-
19
17
Some actions are not available to apps to prevent abuse and maintain platform integrity:
20
18
21
-
-**Voting** - Apps cannot upvote or downvote posts or comments, either as the app account or on behalf of the logged-in user
22
-
-**Following/friending users** - Apps cannot follow users (on reddit.com) or add friends (on Old Reddit), either as the app account or on behalf of the logged-in user
19
+
- Apps cannot upvote or downvote posts or comments, either as the app account or on behalf of the logged-in user
20
+
- Apps cannot follow users (on reddit.com) or add friends (on old.reddit.com), either as the app account or on behalf of the logged-in user
23
21
24
22
---
25
23
@@ -30,23 +28,14 @@ To ensure a positive user experience and compliance with Reddit policies:
30
28
31
29
-**Always ask permission:** Your app must always inform users before posting, commenting, or subscribing on their behalf. This can only happen on an explicit manual action, e.g. from a button.
32
30
-**No automated actions:** Users must explicitly opt-in to the app acting on their behalf. Do not mislead or surprise users.
33
-
-**Establish a reporting flow:** Ensure `userGeneratedContent` is correctly setfor posts submitted on behalf of the user.
34
-
-**Do not gate functionality behind subscribing:** Users should not be made to subscribe to the current subreddit to access any part of your app.
35
-
-**Remember the human:** Follow Reddit's safety and compliance guidelines for user-generated content.
31
+
-**Establish a reporting flow:** Ensure `userGeneratedContent` is correctly setfor posts submitted on behalf of the user.
32
+
-**Do not gate any functionality:** Users should not be made or encouraged to post, comment, or subscribe to continue using your app.
33
+
-**Remember the human:** Follow Reddit's safety and compliance guidelines for user-generated content. Do not create spam-like content or poor user experiences in pursuit of engagement.
36
34
37
35
:::note
38
36
Apps using user actions must follow these requirements to be approved.
39
37
:::
40
38
41
-
---
42
-
43
-
## How it works
44
-
45
-
-**Unapproved/playtest apps:**
46
-
-`runAs: 'USER'` will operate from the app account unless the app owner takes the action.
47
-
- User actions taken by the app owner will be attributed to the app owner's username.
48
-
-**Approved apps:**
49
-
- After publishing and approval, `runAs: 'USER'` will operate on behalf of the user for all users.
50
39
51
40
---
52
41
@@ -66,28 +55,30 @@ To enable user actions, add the required permissions to your `devvit.json`:
66
55
}
67
56
```
68
57
69
-
After enabling, you can call certain Reddit APIs on behalf of the user by passing the option `runAs: 'USER'`.
70
-
71
-
Currently, the following APIs support this option:
58
+
After enabling, you can call certain Reddit APIs on behalf of the user by passing the option `runAs: 'USER'`. The following APIs support this option:
For user privacy there is no API to check if the user is already subscribed to the current subreddit. You may want to store the subscription state in Redis to provide contextually aware UI.
203
+
204
+
---
205
+
206
+
## Adding user actions to games
207
+
208
+
### End-of-game actions
209
+
210
+
✅ An example of a clear end-of-game layout:
211
+
212
+
-`Play Again`
213
+
-`Comment My Score`
214
+
-`Subscribe to r/your_subreddit`
215
+
216
+
This example keeps each action separate and straightforward for the user. Playing again, commenting, and subscribing are distinct decisions and are therefore presented as distinct actions.
217
+
218
+
❌ An example of an unclear end-of-game layout:
219
+
220
+
-`Play Again and Subscribe`
221
+
-`Post Score to Play Next Level`
222
+
-`Comment & Continue`
223
+
224
+
This example mixes intention and is confusing for the user. Apps like this that merge functionality (e.g. playing again) with user actions (e.g. subscribing or commenting) will be rejected during review.
225
+
226
+
### Commenting scores
227
+
228
+
✅ The required pattern for commenting scores is:
229
+
230
+
- Commenting after explicit manual action (e.g. from a button)
231
+
- Commenting by the user (not the app account)
232
+
- Commenting as a reply to a single stickied comment
233
+
234
+
This avoids surprising the user, enables a reporting flow, and allows the user to easily delete their score comment. Replying to a stickied comment keeps this repetitive content with low discussion value out of the way, in an area that needs to be expanded to view.
235
+
236
+
If offering a way for the user to add a custom message to their score, the comment can be posted as a top-level comment. This prioritizes human discussion and creates a more engaging comment section.
0 commit comments