Good morning,
So I'm now able to send and receive chat/messaging messages with the API (I can send messages to my app with the "Messenger" widget, and there are notifications for both messages and typing events in my app, and I can send responses with the POST function mentioned in my last forum question. But I'm having some trouble getting information on existing, still open, chat conversations. And considering these chats can last for up to 3 days, it's entirely possible that a user will find themselves in the same situation I'm in right now: you sign on Monday and have an old chat from Friday that needs wrapping up.
Anyway, here is what I do know:
- I can use
conversations.getConversationsMessageDetails(messageID);
to get the data I'm looking for; it's in a convoluted tree that I have to manually straighten out myself, but it's there. - You need a
participantID
to get themessageID
. So for new/incoming chats this is not a problem. - However, for old chats, when I run something like
onversations.getConversationsChats(myUserId)
the list of participants is an empty array. This lack of participants prevents me from callinggetConversationsMessageDetails
to pull previous conversation info.
So after fishing on the docs for awhile and a few good rounds of hack'n'guessing, it's speculation time:
- I'm guessing that there might be some parameter like
{expand: "participants"}
that I need to call to get the participant list. - A few forum posts suggested the Recordings API of all things... idk what that has to do with web messaging, but maybe it's one of the other chattish APIs (I know there are 3-4 of them and all have been called "chat"). But there's always the possibility that chat history can be retried through some obscure
getRecordingChatHistory
or similar (still fishing for that one). - Since, apparently, these APIs are so new, it's possible that a simple API for getting a complete chat history in chronological order just hasn't been built yet. And I get that - I'm backlogged too.
- Or maybe I'm just way out in left field and there is a nice API obfuscated away someplace (maybe in analytics?) that a Query-Fu Grand Master could do in his or her sleep.
But yeah, I'm kinda out of ideas. Any thoughts?