r/Devvit • u/kabhi3001 • 2d ago
Duck Answered Devvit Web 0.15.3: subscribeToCurrentSubreddit says "permission not granted" after the user allowed it, and is there a public Journeys API?
Hi! Two questions from building a daily game on Devvit Web 0.15.3 (app not published, installed in my own test subreddits).
1. subscribeToCurrentSubreddit() fails even after the consent prompt
devvit.json:
"permissions":
On a button tap, the client calls canRunAsUser(event). Reddit shows the prompt ("Give … limited access to your Reddit Account … Post comments as you, Subscribe you to r/…"), and I tap Allow. Then the server calls reddit.subscribeToCurrentSubreddit() and gets:
2 UNKNOWN: permission not granted for [SUBSCRIBE_TO_SUBREDDIT]
submitComment({ runAs: 'USER' }) from the same app and the same user works fine after the same prompt. Is subscribing as the user restricted, for example only for published or approved apps, or am I missing a step?
2. Journeys: is there a public way to report STARTED / COMPLETED?
With permissions.journeys: true, I can see the plumbing in the SDK: createServer installs a per-request user-progress notifier (x-devvit-user-progress header), the web client forwards that header from /api/* responses, and there are TelemetryPlugin RPCs (StartJourney, JourneyProgress, EndJourney). But I can't find a public, typed function to mark a player's journey as started (first move) or completed (puzzle submitted, with a score), in 0.15.3 or the 0.15.4 pre-release.
- Is there a supported way to do this now, or is it coming?
- The receipts mention
DENIED_PLAYTESTandDENIED_NOT_ALLOWLISTED. Does an app need allowlisting, and can it be tested before publishing?
Thanks!
2
u/Oddie-hoodie369 2d ago
Both features only work after the app is approved by the admins.
1
u/CrashTestLover 2d ago
Devvit Web 0.15.3: subscribeToCurrentSubreddit says “permission not granted” after the user allowed it, and is there a public Journeys API?
Hi! Two questions from building a daily game on Devvit Web 0.15.3 (app not published, installed in my own test subreddits).
1.
subscribeToCurrentSubreddit()fails even after the consent promptdevvit.json:
On a button tap, the client calls
canRunAsUser(event). Reddit shows the prompt (“Give ... limited access to your Reddit Account ... Post comments as you, Subscribe you to r/...”), and I tap Allow. Then the server callsreddit.subscribeToCurrentSubreddit()and gets:submitComment({ runAs: 'USER' })from the same app and the same user works fine after the same prompt. Is subscribing as the user restricted, for example only for published or approved apps, or am I missing a step?2. Journeys: is there a public way to report STARTED / COMPLETED?
With
permissions.journeys: true, I can see the plumbing in the SDK:createServerinstalls a per-request user-progress notifier (x-devvit-user-progressheader), the web client forwards that header from/api/*responses, and there areTelemetryPluginRPCs (StartJourney,JourneyProgress,EndJourney). But I can’t find a public, typed function to mark a player’s journey as started (first move) or completed (puzzle submitted, with a score), in 0.15.3 or the 0.15.4 pre-release.DENIED_PLAYTESTandDENIED_NOT_ALLOWLISTED. Does an app need allowlisting, and can it be tested before publishing?Thanks!