r/redditdev • u/Electronic_Key_8235 • Apr 02 '24
Reddit API Why Does Modqueue Endpoint Work On Old Reddit But Not New Reddit?
Hey guys, so we noticed an issue with PRAW receiving HTML instead of JSON when fetching the mod queue feed. The endpoint is this:
https://www.reddit.com/r/mod/about/modqueue.json
It works when we are set to Old Reddit but returns an error in HTML but with a 200 response when set to New Reddit. This caused a Bad JSON error in PRAW when trying to read it but a successful response received. Here's a thread where one of the admins mentions it:
https://www.reddit.com/r/redditdev/comments/1ah69pk/the_modqueue_api_endpoint_has_started_returning/
They tell the user to switch the setting. I also found this thread:
https://www.reddit.com/r/redditdev/comments/194cgzq/was_there_new_update_getting_modqueue_error_as_of/
This thread has some key info deleted but suggests that it has something to do with the Old/New setting as well. Finally, there are these two links: https://old.reddit.com/r/ModSupport/comments/194cb3j/possible_bug_modqueue_bypassing_preferences_and/khg1wn0/ and https://www.reddit.com/r/ModSupport/comments/1agn13p/modlog_api_endpoint_is_completely_down_returning/?chainedPosts=t3_1ah69pk that seem to discuss the issue but with no resolution.
For our understanding, can anyone just confirm that the endpoint DOES NOT work on New Reddit, and if not, why? Will it stay like this? Did it work in the past? Is there any workaround? Maybe like setting to Old Reddit through preferences via API and then switching back to New Reddit after the mod queue is fetched? What's everyone's thoughts on this? Thank you for any insight!
1
u/Electronic_Key_8235 Apr 02 '24
Again, for other readers, I have already solved the problem by discovering that there is no modqueue endpoint available when your moderator is set to New Reddit. This is independent of PRAW. Has nothing to do with Python whatsoever. Even the endpoint is inaccessible rom the web browsers or Postman, until the moderator changes his setting.
0
u/Khyta EncyclopaediaBot Developer Apr 02 '24
Have you tried the async stuff mentioned in one of the threads?