- How do I install rennokki/reddit-json-api in a Laravel app?
- Install it with Composer using composer require rennokki/reddit-json-api; Laravel auto-discovers the service provider. Publish the configuration file with vendor:publish, then set a descriptive User-Agent before making any calls. No credentials or callback routes are needed because the package uses Reddit's public JSON endpoints.
- Does rennokki/reddit-json-api require OAuth or API keys?
- No. The package wraps Reddit's public .json endpoints, so there is no OAuth flow, no API key, and no callback route to configure. That removes a large amount of integration friction and security surface, but it also means you are subject to Reddit's anonymous rate limits and access restrictions. It is read-only by design.
- Which PHP and Laravel versions does rennokki/reddit-json-api 2.5.0 require?
- Version 2.5.0 requires PHP 8.1 or 8.2 and targets Illuminate 10.x. Teams on Laravel 8 or 9 must stay on a prior package line or complete their framework upgrade first, since 2.5.0 is a hard platform floor bump. Verify transitive Composer constraints, because packages still pinning illuminate/support ^8 or ^9 will conflict.
- How do I fetch subreddit posts and comments with this package?
- After installing and configuring the package, you call the facade to retrieve subreddit listings, posts, and comment trees from Reddit's public .json endpoints. The package is a low-ceremony HTTP client, so it does not store data or run queues for you. The recommended pattern is to wrap calls in an application-owned repository, such as RedditFeedRepository, and add caching and error handling around it.
- Can I access private subreddits or post content with rennokki/reddit-json-api?
- No. The package only works with Reddit's public anonymous .json endpoints, so it cannot read private subreddits, authenticated user data, or perform writes, votes, or moderation actions. If you need those capabilities or higher rate tiers, you need an OAuth-based Reddit client instead. This package is the wrong primitive for authenticated workflows.
- How do I avoid Reddit 403 and 429 rate limit errors with this package?
- Start by setting a descriptive, unique User-Agent in the config, because Reddit aggressively returns 403 and 429 responses to generic or default agents. Add a caching layer so repeated reads do not translate into repeated upstream requests, and throttle outbound calls. Measure 429 rates from your actual egress IPs before assuming sustained throughput is available.
- Is rennokki/reddit-json-api suitable for production use?
- For read-only use cases with caching and explicit error handling, it is reasonable, but treat it as an infrastructure adapter rather than core domain logic. The main risk is upstream: Reddit's unauthenticated JSON access is rate-limited and increasingly restricted, and there is no OAuth path to remediate if anonymous access changes. The package also has a single maintainer, so isolate it behind an internal interface you control.
- How do I test code that depends on rennokki/reddit-json-api?
- Mock the facade or, better, bind a fake implementation of your own Reddit repository interface in the container during tests. You can also fake the underlying HTTP layer so no real requests reach Reddit. Avoid hitting live Reddit endpoints in automated tests, because anonymous rate limits will make suites flaky.
- Is rennokki/reddit-json-api still maintained, and what happens if it is abandoned?
- It is maintained by a single maintainer, with release cadence driven mainly by framework compatibility rather than new features. Version 2.5.0 is a platform floor bump, not a feature release. Because the bus factor is one, keep the package behind an application-owned interface so you can swap it for another client or a direct HTTP implementation if it is abandoned.
- What are alternatives to rennokki/reddit-json-api if I need OAuth or write access?
- If you need OAuth, write access, moderation actions, private subreddits, or higher rate tiers, look for an OAuth-based Reddit API client rather than this package. This package intentionally covers only unauthenticated public reads. Choosing an OAuth-capable client up front avoids a later rewrite when anonymous access proves insufficient.