PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, November 18, 2022

[FIXED] How to get around "[409] Group MMS with given participant list already exists as Conversation" error in twilio?

 November 18, 2022     twilio, twilio-api, twilio-php     No comments   

Issue

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?


Solution

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


Answered By - philnash
Answer Checked By - Gilberto Lyons (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing