Skip to content

[RedditBridge] Use OAuth2 token and endpoint for accessing the JSON API - #5039

Draft
Electronic-Mango wants to merge 2 commits into
RSS-Bridge:masterfrom
Electronic-Mango:master
Draft

[RedditBridge] Use OAuth2 token and endpoint for accessing the JSON API#5039
Electronic-Mango wants to merge 2 commits into
RSS-Bridge:masterfrom
Electronic-Mango:master

Conversation

@Electronic-Mango

@Electronic-Mango Electronic-Mango commented Jul 13, 2026

Copy link
Copy Markdown

Allow users to specify their own Reddit utility script app credentials to use OAuth2 authorized version of the API, since Reddit disabled unauthenticated JSON requests.

The new parameters are configured through config.php.ini and RedditBridge specific configuration:

[RedditBridge]
app_id = "<ID>"
app_secret = "<secret>"

"Solves" #4866 and #3802, however there are two problems:

  1. Instance-specific configuration required private instances of RSS-Bridge.
  2. Reddit blocked creating the legacy script apps. Now they require submitting a request and getting an approval. Already existing apps seem to work fine.

As for 1. - I'm not sure if there's a different approach, than private instances. I could modify the bridge to require those credentials via regular bridge parameters, but passing secrets through query seems like a bad idea.

As for 2. - I'm not even sure if it's worth merging such change, as it's impossible to use the bridge without having already working app. The bridge does work if you do, but you can't get it working if you didn't create the app in the past.

Due to this I'm creating it as draft for now, but perhaps it will be useful for someone with already existing app.

Add Reddit authorization via OAuth2 and legacy developer script "app".
Username/password (or app ID/secret) are read from "config.ini.php",
as configuration specific to RedditBridge.
On first 401/403 try to refresh the OAuth2 token and try to send
the request one more time.
@github-actions

Copy link
Copy Markdown

Pull request artifacts

Bridge Context Status
Reddit 1 single (current) HTTP status 429 Too Many Requests
Type: RateLimitException
Message:
Reddit 1 single (pr) Bridge returned error 401! (20647)
Type: HttpException
Message: https://www.reddit.com/api/v1/access_token resulted in 401 Unauthorized
Reddit 2 multi (current) HTTP status 429 Too Many Requests
Type: RateLimitException
Message:
Reddit 2 multi (pr) Bridge returned error 401! (20647)
Type: HttpException
Message: https://www.reddit.com/api/v1/access_token resulted in 401 Unauthorized
Reddit 3 user (current) HTTP status 429 Too Many Requests
Type: RateLimitException
Message:
Reddit 3 user (pr) Bridge returned error 401! (20647)
Type: HttpException
Message: https://www.reddit.com/api/v1/access_token resulted in 401 Unauthorized

last change: Monday 2026-07-13 22:25:25

@dvikan

dvikan commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

@Electronic-Mango @dawidsowa

hmm maybe a new bridge for this

i prefer a new class RedditClient

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants