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.

Resolving Error 20404 When Re-Adding the Same Participant

Issue

Some Twilio Conversations users may encounter a recurring issue where deleting a Participant from a Conversation and then attempting to re-add the same Participant results in a 404 Not Found error (error code 20404). Despite the error, the Participant is actually created successfully. This article explains the symptoms, root cause, and a proven workaround, and provides guidance for affected users.

Symptoms

  • When deleting a Participant from a Conversation and then re-adding the same identity, the API returns:
    • 404 Not Found (error code 20404):
      "The requested resource /v1/Services/{ServiceSid}/Conversations/{ConversationSid}/Participants was not found"
  • Fetching the list of Participants after the failed POST shows that the Participant was actually created.
  • The issue is consistently reproducible for certain user identities, often those created on a specific date.
  • Only some identities are affected; others work as expected.

 

Cause

  • The issue is related to stale or inconsistent backend mappings for specific user identities in Twilio Conversations.
  • In the reported case, all affected identities were originally created on the same day, suggesting a backend data issue from that period.
  • Deleting only the Participant does not fully clear the backend state for the identity, leading to the observed error.

 

Resolution

To resolve the issue for affected identities:

  1. Delete the User Identity
    Remove the User identity from the Conversation Service, not just the Participant from the Conversation.
  2. Recreate the User Identity
    After deletion, recreate the User identity.
  3. Add the Participant Again
    Now, add the Participant to the Conversation as usual. The operation should succeed without a 404 error.

This process fully clears any stale or inconsistent state for the affected identity.

Example API Sequence

  1. DELETE /v1/Services/{ServiceSid}/Users/{Identity}
    (Removes the User identity from the service.)
  2. POST /v1/Services/{ServiceSid}/Users
    (Recreates the User identity.)
  3. POST /v1/Services/{ServiceSid}/Conversations/{ConversationSid}/Participants
    (Adds the Participant to the Conversation.)

Additional Information

If you encounter persistent 404 errors when re-adding Participants in Twilio Conversations, especially for identities created on a specific date, delete and recreate the User identity before adding them as a Participant. This clears stale mappings and resolves the issue until a permanent fix is deployed.

  • Twilio engineering is aware of this issue and is working on a permanent backend fix.
  • The workaround above has been confirmed to resolve the issue for affected users.
  • If you continue to experience problems, collect API request/response logs and contact Twilio Support for further assistance.

Below you will find references to useful documents:

Have more questions? Submit a request
Powered by Zendesk