Fetching specific conversations of one user does not work | Community
Skip to main content
Answered

Fetching specific conversations of one user does not work

  • September 1, 2024
  • 2 replies
  • 39 views

I want to fetch a user's conversations with this endpoint, but it currently returns all the conversations my team has had. I implemented this code using Intercom’s documentation but it does not work as expected: https://developers.intercom.com/docs/references/1.2/rest-api/conversations/list-conversations

const response = await fetch(`https://api.intercom.io/conversations?type=user&intercom_user_id=${user.intercomId}`, {

method: 'GET',

headers: {

'Authorization': `Bearer ${accessToken}`,

'Accept': 'application/json'

}

})

Best answer by Jacques Reynolds

Hey @canbalkaya 👋 Jacques here from support engineering.

You can actually use the Search Conversations endpoint to retrieve a list of Conversations based on the User associated with it.

You can specify the contact_id to get the User ID associated with those conversations and it will return only those Conversations :)

2 replies

Diana Tripac
Intercom Team
Forum|alt.badge.img+3
  • Leading the Community @ Intercom
  • 167 replies
  • September 4, 2024

Hi @Nathan Sudds @Milan adding you here in case you have any ideas on that 🙌


Jacques Reynolds
Intercom Team
Forum|alt.badge.img+7
  • Intercom Team
  • 216 replies
  • Answer
  • September 5, 2024

Hey @canbalkaya 👋 Jacques here from support engineering.

You can actually use the Search Conversations endpoint to retrieve a list of Conversations based on the User associated with it.

You can specify the contact_id to get the User ID associated with those conversations and it will return only those Conversations :)