Custom React Input on OpenChannel Throws 400201 Channel Not Found Error


  • sendbird-uikit v2.7.0
  • react v17.0.0
  • react-dom v17.0.0

I have an issue sending a message in the chat to an open channel by using a custom input React component.

My example is here: (2-5) Customizing MessageInput (forked) - CodeSandbox

In the App.js file in the codesandbox example, if I remove line 71 “renderMessageInput” attribute from OpenChannel and let the UIKit render its input component then it works, so I’m guessing the APP ID and the Channel URL is correct.

By using a custom input React component and using the “getSendUserMessage” function it doesn’t work. The response from the SendBird API is “SendBirdException: “Channel” not found.” error code 400201.

Please, can you help me out if I’m doing something incorrectly or is this a bug in the SendBird API?

Hi @George, and welcome to the Sendbird Community!

I have your case that you opened with the support team and I wanted to reply here for visibility in the event someone else has the same question.

In your example you provided, you are using getSendUserMessage() which is a method for Group Channels. You should use getOpenChannelSendUserMessage() instead when using Open Channels.

I modified the sample you provided on Line 54 and was able to send a message:

Please refer to this list of Open Channel selectors in Sendbird Docs.

1 Like

Thanks a lot for the quick response!

1 Like

My pleasure! Always happy to help!