r/Devvit • • 19d 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": {
  "redis": true,
  "journeys": true,
  "reddit": {
    "enable": true,
    "scope": "user",
    "asUser": ["SUBMIT_COMMENT", "SUBSCRIBE_TO_SUBREDDIT"]
  }
}

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_PLAYTEST and DENIED_NOT_ALLOWLISTED. Does an app need allowlisting, and can it be tested before publishing?

Thanks!

3 Upvotes

3 comments sorted by

View all comments

1

u/CrashTestLover 19d 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 prompt

devvit.json:

"permissions": {
  "redis": true,
  "journeys": true,
  "reddit": {
    "enable": true,
    "scope": "user",
    "asUser": ["SUBMIT_COMMENT", "SUBSCRIBE_TO_SUBREDDIT"]
  }
}

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_PLAYTEST and DENIED_NOT_ALLOWLISTED. Does an app need allowlisting, and can it be tested before publishing?

Thanks!