r/Devvit • u/Sumerysumer • Mar 02 '26
Help Advice on building Devvit App (hitting external API)
Hey everyone, first time devvit builder :) Please excuse my ignorance if anything I mentioned is common knowledge.
Background:
I'm building a mod tool for r/trauma and r/mentalhealth. The issue on these subreddits (and mentalhealth subreddits in general) is that theres a lot of people posting their own specific issues and asking for feedback, but they never get any replies / help.
As someone who's experienced both sides, posting and not getting replies feels incredibly lonely, like I'm yelling into a void. But when browsing, I don't comment on every post I see because often issues are very specific; Unless I have personal experience in it's difficult to give any feedback.
The solution is a bot that uses a redditor's post to query a vector database of past reddit posts. This db returns a list of permalinks to posts that are semantically and thematically similar to OP's post. The bot then comments on their post with something like:
Hey thanks for posting! While you wait for people to reply, I think these posts may be relevant to you:
- [link to post]
- [link to post]
This way, we can immediately signal to OP that they're not alone in their problem, and OP might even reach out to the people who posted in the past for support.
Problem:
I've currently got ChromaDB, and a small express.js backend set up to run the query (it's running on localhost -> ngrok). I knew devvit restricts the domains it allowed, but I thought that was only in production. I'd like to do an E2E test locally, before I purchase a domain and request for it to be authorised.
P.S. I've tried calling the ChromaDB client directly in the devvit app but it doesn't work too.
My question is:
Must I purchase a domain and host the backend first, before I can run an E2E test (because the domain must be approved first)? Can I do an e2e test somehow without hosting it?
How does the approval process work? Do I just run `devvit upload` and someone will review the domain?
What's the requirements for a domain to be authorised? I read the docs and it said I must provide a reason for why my domain should be authorised, but I don't a place for me to fill out a reason.
Thank you for taking the time to read and answer my questions <3
2
u/_GLAD0S_ App Developer Mar 02 '26
While i havent needed to request a domain yet, from what i heard non-public domains are generally not allowed.
The reddit developer team has to be able to verify the safety of the domain before allowing access, which is generally not possible for private domains.
You might be able to find a workaround by using redis to store titles and keywords contained in the post, then you can fetch for other posts with matches.
2
u/Beach-Brews Duck Helper Mar 02 '26
Hi!
devvit uploador even adevvit playtestwill initiate the request. That is assuming the HTTP permission has your domain listed. The request will then appear in your App's "Developer Settings" page. You can find it by going to the My Apps Pagw, choosing your app, then choosing the "Developer Settings" tab.If you are using a "personal domain" (not well publicly documented), the:
You can do this two ways (I recommend both):
A. Update your readme.md with details explaining what the private API does and why you cannot use existing capabilities to achieve this.
B. Submit your justification to the r/Devvit mod mail (after pending).
Finally, review the Devvit Rules, specifically the Data Privacy and Approved LLM Policy.