twilio conversations

I am new guy for using Rest APIs. I am using Twilio conversations. Is there a possibility to get the conversation sid (CH...) with the help of binding numbers?
Actual Usecase: I created few conversations and added participants. I dont have the conversation sid (CH..). I got exception while adding the same binding numbers to another conversation. I want to get the conversation sid (CH) to which those numbers are added. All I know is the binding numbers alone.
Please help.
Answers
-
You may be able to take a look at one of two options:
- Lookup via Conversations list of users
- Lookup via ParticipantConversations
I am including links to the auto-generated docs (for JS) as there are not many live examples. The base link for the helper library is https://twilio.com/docs/libraries/reference/twilio-node/
Lookup via Conversation users might look like:
const twilio = require('twilio')(account_sid, auth_token); const users = await twilio.conversations.users.list(); for (let u of users) { // do something with binding against user properties }
Lookup via ParticipantConversations might look look:
const twilio = require('twilio')(account_sid, auth_token); const participantConversations = await twilio.conversations.participantConversations.list(); for (let p of participantConversations) { // do something with binding against user properties }
You may even be able to pass in the address the list call above to find conversations for those bindings.
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