Unable to send messages in Chat

Hi,
I am trying to enable and test the chat component on my app. I logged in, went to the Chat screen, selected the new message button in the corner and tried to select a recipient. From there, I see “Error creating a conversation”. When I click Details, it says, “You have not logged in on this app”.
When I Inspect the Network requests, I see:

   GET https://us.api.fliplet.com/v1/apps/114513/chat/contacts 400 (Bad Request)
   GET https://us.api.fliplet.com/v1/apps/114513/chat/conversations 400 (Bad Request)
   POST https://us.api.fliplet.com/v1/apps/114513/chat/messages (Bad Request)

I even tested on the Fliplet Viewer and get the same error.
Is there something that needs to be done to enable Chat properly on these Event apps?

Hi,

This might be happening due to a few potential reasons. Please ensure the following is correctly set up.

  1. The login component and the chat components are connected to the same data source. You can verify this by editing each component in studio and checking which DS they are connected to.

  2. You login to the app correctly (not just Fliplet studio). You can confirm this by enabling the “Enable security” option in preview mode which will force you to login to the app itself.

Hope this helps,
Deb

Thank you Deb! Is there a way to limit the chat functionality to certain users? For example, I don’t want all people to have access to the app to be able to chat with anyone. I only want certain users to be in the chat list so that people can only message certain individuals.

You will need to use custom JS to filter out the users. Under Developer options > Screen JS you can use the following hook to intercept the list of contacts that will be displayed to the end user.

Documentation: Chat JS APIs | Fliplet Developers Documentation

Hope this helps,
Deb

1 Like