Conversation API getting conversation(s) between two participants

I am looking for a way to pass in the ID of two users (a user and participant?), and retreive the messages from that conversation. Is there a way through the conversations API to do this? I have been trying a few different ways but have not found a solution. Am I missing something right in front of me?
Answers
-
Hi @samunt , I'm happy to help where I can! ✨
If you have the user sid (USXXXXXXXXXXXXX) you can fetch a list of conversations for that user (known as user conversations). Check out these docs: https://www.twilio.com/docs/conversations/api/user-conversation-resource?code-sample=code-list-all-of-a-users-conversations
Note that this only applies to chat-based participants, SMS participants do not have a user SID
-
You can also use https://www.twilio.com/docs/conversations/api/participant-conversation-resource to make a lookup for all types of participants(including SMS/Whatsapp, etc)
Categories
- 83 All Categories
- 19 SIGNAL 2021
- 376 Product Discussions
- 7 Community - Announcements
- 2 Changelog
- 4 Forum UI Updates
- 8 Welcome Guide
- 6 Community - Events
- 2 Twilio Relay Developer Conference 2021 Mega Thread
- 1 External Community Events
- 25 Inspiration
- 17 Community - Other Discussions
- 1 Community- Twilio Startups