Solved

Excluding private conversations and messages

  • 20 April 2023
  • 3 replies
  • 106 views

Badge +3

Is there a query that can be passed into the list conversations and/or search end point to exclude conversations (eventually messages) that are is_private?

icon

Best answer by jason 20 April 2023, 23:46

View original

3 replies

Badge +3

I guess one of the followup questions to this, what does is_private mean? 

Badge +3

Another followup is does having an api token scope of Shared Resources mean that the client won’t see any is_private conversations/messages?

Userlevel 4
Badge +7

Hi @Tomt , 

Is there a query that can be passed into the list conversations and/or search end point to exclude conversations (eventually messages) that are is_private?

Sort of, yes. Your options are:

  1. Use an API token that has Shared Resource scopes only (so it can not access any private conversations/inboxes)
  2. If using the GET /conversations endpoint, consider the List Inbox Conversations endpoint to instead list conversations present in a specific inbox (this will exclude private conversations, assuming you’re fetching from an inbox in a shared workspace).
  3. If using the GET /conversations/search/:query endpoint, consider adding filters for specific inboxes; this will have a similar effect as described in #2. 

 

I guess one of the followup questions to this, what does is_private mean? 

The is_private field on a conversation being true indicates that every inbox the conversation is present in is an individual inbox (rather than a shared workspace inbox).

 

Another followup is does having an api token scope of Shared Resources mean that the client won’t see any is_private conversations/messages?

Not necessarily; an API token can have multiple scopes. If a token only has the Shared Resources scope, it would not be able to access any conversations present in individual inboxes.

Hope this is all helpful!

Reply