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.

Troubleshoot 403 Forbidden Errors on getConversationBySid Calls

Objective

This article explains how to troubleshoot and resolve 403 Forbidden errors (Twilio error code 50430 — "Participant is not a member of conversation") returned when calling getConversationBySid or fetching conversations using the Conversations SDK. It covers how to confirm the root cause through the Twilio Console logs, how to add the missing participant to restore access, and how to prevent the issue from happening again across your application flow.

 

Product

Twilio Conversations

 

Environment

Twilio Console

 

User Account Permission/Role(s) Required 

Access to the Twilio Console for the affected Account or Subaccount, with permission to view Debugger logs and Conversations resources.

 

Procedure 

1. Confirm the error code in the Twilio Console

A 403 Forbidden response from the Conversations SDK can be triggered by several underlying conditions. Before applying any fix, confirm the exact error code:

  1. Log in to the Twilio Console and select the Account or Subaccount where the issue is occurring.
  2. Navigate to Monitor > Logs > Errors
  3. Filter by the timestamp of the failed request, or by the Conversation SID (for example, CHxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx). 
  4. Open the matching log entry and look for the following fields:
  • twilio_error_code: 50430
  • http_response_status_code: 403

If the error code is 50430, the cause is confirmed: the identity used to generate the access token is not listed as a participant in the conversation being fetched. Continue with the steps below.

 

2. Verify the participants of the affected conversation

Confirm that the identity is missing from the conversation participants list. Replace the placeholder values with your own:

 
GET https://conversations.twilio.com/v1/Conversations/CHxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/Participants

Use Basic Auth with your Account SID and Auth Token. Review the response and check whether the affected identity (for example, participant1234) appears in the participants array. If it does not, proceed to the next step.

 

3. Add the missing identity as a participant

You can add the participant using either the REST API directly or one of the Twilio Helper Libraries.

Option A: REST API (suitable for testing in Postman or curl):

 
POST https://conversations.twilio.com/v1/Conversations/CHxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/Participants

Request body (form-encoded):

Identity=participant1234

A successful request returns a 201 Created response containing the new Participant SID (MBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx).

Option B: Node.js Helper Library:

const client = require('twilio')(accountSid, authToken);

await client.conversations.v1
  .conversations('CHxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
  .participants
  .create({ identity: 'participant1234' });

 

4. Retry the original SDK call

With the participant now added, retry the original call from your client application:

const conversation = await client.getConversationBySid('CHxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');

The call should now succeed without a 403 Forbidden response.

 

5. Prevent recurrence in your application flow

If the error happens repeatedly or only under specific tenants or subaccounts, review your application to ensure that the identity is added as a participant whenever a conversation is created or accessed. A common gap is application logic that creates or fetches the User inside the Chat Service during token generation, but never adds that user as a participant to existing conversations. The two operations are independent and both are required for SDK access to work end-to-end.

Recommended checks:

  • Confirm that your conversation creation flow adds all expected identities as participants.
  • If access is granted on-demand (for example, when a dashboard user opens a conversation), add the participant on the server side before issuing the token or before the client calls getConversationBySid.
  • If the issue appears in only one subaccount, compare the participant-creation logic against working subaccounts to identify any divergence.

 

Additional Information 

Have more questions? Submit a request
Powered by Zendesk