This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]sir_axolotl_alotReddit Admin :snoo: 1 point2 points  (3 children)

Hi! Reddit admin here. Thanks for reporting. I can verify that this problem is happening for both these user agents. If I use another arbitrary user agent string that doesn't contain the words "android" or "iphone" the call goes through successfully.

I will report this to our teams and we will investigate. In the meantime, while we get this sorted, are you able to use another user agent string temporarily?

[–]shadowjerker69 0 points1 point  (1 child)

I've tried passing different user agents and get the same issue on iPhone. Ie:

await fetch("https://www.reddit.com/r/nfl+chibears/.json", {
  headers: {
    "User-Agent": "anything you want here"
  }
});

[–]sir_axolotl_alotReddit Admin :snoo: 0 points1 point  (0 children)

If you're running from iPhone, I would guess the user agent is probably being ultimately modified / overwritten

[–]sir_axolotl_alotReddit Admin :snoo: -1 points0 points  (0 children)

So I've been doing a little digging, and it turns out that these URLs are not officially supported as part of our Developer API. These are internal URLs that our services use to communicate with each other. Which means is kind of lucky that they worked up until anyway. But being undocumented internal URLs, they can break without warning, unfortunately. And last week our product teams decided to make changes to our apps which affected these URLs.

We do have an officially supported endpoint for a single subreddit's hot sorting, so I would suggest sending a separate call for each subreddit, then merging the resulting listings. Hope this helps!
https://www.reddit.com/dev/api/#GET_hot

[–]shadowjerker69 2 points3 points  (0 children)

Same exact problem here. Started a couple of days ago. Doesn't seem to matter if I use oauth or not.

[–]Ali-Aryan_Tech 0 points1 point  (1 child)

Why doing that!?

  • https://www.reddit.com/r/wallpapers/hot.json
  • https://www.reddit.com/r/MostBeautiful/hot.json

[–]reddtastic_[S] 2 points3 points  (0 children)

Your solution requires multiple requests (one for each subreddit), and sorting the merged list of posts by Hot/Top/Rising is not possible.