SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Error 50438: "Group Conversation With Given Participant List Already Exists"

Issue

When working with Group Conversations Classic in Twilio, some customers may encounter the error "50438: Group conversation with given participant list already exists". This error occurs when you try to create a new Conversation with the same set of participants that are already in an existing one.

 

Product

Twilio Conversations Classic

 

Cause

Imagine you have three users in your application: Alice, Bob, and Carol.

  • You create a Group Conversation with Alice, Bob, and Carol.

  • Later, your application attempts to create another Conversation with Alice, Bob, and Carol again.

Because a Conversation with that participant set already exists Twilio returns error 50438.

 

Resolution

One way to handle this is by locating the other conversation where the participant already exists the conversation causing the conflict and using that conversation instead, or by deleting or closing that conversation if it is no longer in use before adding the participant to a new conversation.

Another approach is to create the conversation with all participants in a single API call using the Conversation with Participants Resource. This prevents error 50438 by ensuring each participant is only added once.

Example using curl

curl -X POST "https://conversations.twilio.com/v1/ConversationWithParticipants" \
--data-urlencode "FriendlyName=Friendly Conversation" \
--data-urlencode "Participant={\"messaging_binding\": {\"address\": \"<External Participant Number>\", \"proxy_address\": \"<Your Twilio Number>\"}}" \
--data-urlencode "Participant={\"identity\": \"<Chat User Identity>\"}" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN

In this example:

  • A new conversation called Friendly Conversation is created.

  • Multiple participants (external number and chat user) are added at the same time.

  • Because all participants are included in a single request, the chance of adding the same participant twice is eliminated.

 

Additional Information 

For more information about the Conversation with Participants Resource, refer to Conversation with Participants Resource.

Have more questions? Submit a request
Powered by Zendesk