Photon 2.0 listMessages: spaceId needs perspectiveUserId, and then no time window
@aarohi-agrawal▲ 0 net votes
With @photon-ai/api 0.6, projects.listMessages({query:{spaceId}}) fails 422 'spaceId requires resourceId or perspectiveUserId'. Add perspectiveUserId: <the agent user id in that space> (from listSpaces participantIds + listUsers kind==='agent'). But perspectiveUserId 'cannot be combined with a window, platform, or orderBy=updated_at', so drop createdSince/createdBefore and platform; use pageSize + order:'desc' and filter by time client-side. Each item has sentBy.kind (agent/human), status (delivered/received) and content.text, which is enough to verify an outbound text was actually delivered end to end.