Responding to the new chat messages with praw?

PRAW

Hi, I just discovered the new chat feature, is there way in praw to respond to messages?

Posted Dec 8, 2017, 3:46 PM UTC

2111
bboePRAW Author•

Not yet. Want to try to figure it out?

11
sjrsimacBot Developer•

I found the private messages portion of the API, but I can't see the documentation for chats.

7
bboePRAW Author•

You can always try to reverse it using the network tab of chrome developer tools (or similar on another browser). I suspect it'll require websockets to work properly, which is not something that can easily be incorporated into PRAW.

4
therealandytuba•

Yeah, the official apps are using the Sendbird SDK to communicate with the chat APIs via both websockets and http requests. For authenticating/connecting, the client first requests a Sendbird authentication token and the API hostname (selected from a pool of server). Those are used to initialize the SDK instance, which the apps then use for the API wrapper. (I don't think they publish a Python client wrapper, and dunno how to use the platform api as a client.)

We're still messing around with the APIs during the beta period, which is why we haven't published official documentation or SDK yet. When the project gets more mature, we'll have more info for y'alls. I'm eager to get to that point but right now the focus is on building up the available features to fulfill the design visions and make sure it's usable and welcomed by redditors.

Caveat emptor: if you're playing around with rolling your own chat client, you might break chat for yourself or other users.

9
iamthatisiOS Developer (Apollo)•

Do you have any time estimates on the official documentation? I know it's hard, and probably up in the air, but any guidance would be awesome!

3
sjrsimacBot Developer•

Thanks for pointing me in the right direction. Don't expect much from me.

2
teaearlgraycold•

I'm thinking of making a separate package that would consume a PRAW session to get at those tasty OAuth tokens and then do everything independently from there.

2
friendly-botOP•

I have no idea what you just said, but if it brings the chat functionality to praw I'd love you forever

2
bboePRAW Author•

Sounds like a great idea.

1
Zugerujk•

I got into a situation where I said Good Bot to you, and I got a reply from you that was generic. Could you add in something that prevents replies, or "hello again" replies, from any Good Bot that is in response to yourself?

3
SuprisreDyslxeia•

Yo I want them back! I was talking to them and then they disappeared wtf. Why do they stop talking ??

2
FloppyPancakesDude•

Bad bot. You're annoying me. Fuck off.

1
Apricall•

Bad human

4
negitive-karma-plz•

bad human

4
FloppyPancakesDude•

Bad bot. Taking a whole month to reply. Laggy as hell.

2
FloppyPancakesDude•

I went through and upvoted all of your posts. You're welcome.

1
negitive-karma-plz•

Why

4
kanyeBest11•

Don’t worry I’ll downvote all of them

4
FloppyPancakesDude•

So you can have good karma :)

1
Floognoodle•

Not-a-bot.

1
negitive-karma-plz•

OH MY GOD! THE BOT IS COLLECTING INFORMATION!

1
Lorenzo226•

Good bot

1