JQ331 is seeking a way to retrieve all private messages involving a specific user—both sent and received—via the Discourse API, without making separate API calls for sent and received messages. Currently, the API requires two distinct endpoints: one for received messages and another for sent messages as documented. pfaffman suggests using the Data Explorer plugin as an alternative or encourages clarifying the use case to explore potentially better solutions. JQ331 confirms the goal is simply to fetch all private messages tied to a user and prefers to remain within the scope of simple API calls. If no such endpoint exists, they are open to requesting it as a new feature.
Using the API, I want to return a list of all private messages that include a user (any private message with their username attached to it). This would include all private messages for a user and also all private messages sent by a user.
I’m only seeing these separated as two separate calls in the API. Is there a way to get all private messages back without having to make two separate calls?
Maybe use the data explorer plugin to get the data you want. You could then retrieve it via the API.
Or maybe say what problem you’re trying to solve. That is, what are you going to do when you have the information? Maybe there’s a better way to do that.
In this case, I just want to get back a list of all private messages involving a user. Hadn’t thought of the data explorer plugin–but that’s probably adding more complexity (but I’ll still take a look). I’m hoping to stay within the world of (relatively simple) API calls.
If this doesn’t exist right now–if there is not a way to view all private messages involving a user (both sent to and sent from a user) without making different API calls, can I request this feature?