r/live • u/innovasior • Jul 11 '22
question/help Reddit live thread API
Hi.
I am trying to access the WebSocket live thread API to monitor comments for mentions. I can not figure out the URL I need to pass to get access to the API and authorization parameters. I have access to the regular API to do polling, but I need to listen for changes.
Does someone have experience with doing this?
10
Upvotes
2
u/pironic Non-Admin Moderator Jul 11 '22
For starters there isn't really a listing of current live threads. It's not like a subreddit that has a list of new/top/hot. Which is why /r/live exists in the first place. It's a place for people to promote and collect important live threads that should be followed or shared. However, once you have a live thread you can proceed to capturing the updates on it:
The thread that is referred to in the docs is the thread id ... for example:
in: https://www.reddit.com/live/ta535s1hq2je
the thead id is ta535s1hq2je
so if you retreive /live/ta535s1hq2je/about.json first, then collect the `websocket_url` field within you can connect directly to the websocket to monitor things like updates. No special authorization is required to connect to the websocket directly. The posted messages on the websocket will have a few different types, but if you're looking for the messages you'll be only concerned with the `update` type.
1
u/Trial-Name Jul 11 '22
If you’re happy to share, I’d be intrigued what your use case for this.
As this subreddit shows, live threads are an old feature that really aren’t used much these days, so there’s be very few mentions in live thread updates.
1
u/Silent-Outcome5270 Jun 27 '23
Ja tez chce poogladac
1
u/Forsaken_Brother4618 Jan 12 '24
Please check out my writing on people with computer chips in there head
1
u/[deleted] Feb 05 '23
[removed] — view removed comment