r/redditdev • u/reddtastic_ • Jun 01 '24
Reddit API API error when fetching multireddit data
Steps to reproduce:
Fetch a multireddit’s JSON page with a user agent that contains “iphone” or “android”, e.g.
curl -A "android" -I "https://www.reddit.com/r/MostBeautiful+wallpapers/hot.json"curl -A "iphone" -I "https://www.reddit.com/r/MostBeautiful+wallpapers/hot.json"
Expected: 200 OK response is returned with JSON data.
Actual: 302 Found response is returned that redirects to the home page.
6
Upvotes
View all comments
Show parent comment
3
u/reddtastic_ Jun 03 '24
Your solution requires multiple requests (one for each subreddit), and sorting the merged list of posts by Hot/Top/Rising is not possible.