2

I'm having trouble creating a 4-people conversation in twilio when 3-people conversations already exist:

  1. given a conversation C1 with the following participants: P1, P2, P3.
  2. given a conversation C2 with the following participants: P1, P2, P4.
  3. creating a conversation C3 with the following participants: P1, P2, P3, P4 throws an error: [409] Group MMS with given participant list already exists as Conversation. https://www.twilio.com/docs/errors/50438

I'm using php twilio sdk(5.41.1) to first create a conversation resource and then create participant resources one by one in a loop. The error happens when adding P3 because at this point C3's participant list is identical to that of C1.

Is there a way to get around this issue?

1 Answers1

2

Twilio developer evangelist here.

This is a current design constraint internal to the Conversations product. As you can imagine, once you create C3 and add P1, P2, and P3 it matches the first and fails. The fix for this will have to come on the Twilio side.

There is a workaround though. When creating the conversation C3 add a dummy participant with a fake number while you build up the the group, then remove the participant before sending any messages.

C3 => P1, P2, P5, P3, P4
//then remove P5
Dharman
  • 30,962
  • 25
  • 85
  • 135
philnash
  • 70,667
  • 10
  • 60
  • 88
  • Any better solution (than this workaround) to this issue @philnash? The proposed workaround has its own issues -- e.g., if there is a {P1, P2, P5} convo existing (and we have failed to remove P5) then the same issue arises. One workaround to that workaround's issue is to use a "semi-random" fake P5 number (instead of a constant fake P5 number). But that's way too hacky! – Aidin Dec 22 '22 at 19:10
  • 1
    @Aidin I’m afraid the best way to get an answer about that is to contact Twilio support. I no longer work there, so I can’t help. – philnash Dec 23 '22 at 22:17