This API is responsible for executing data interactions across the Twilio COnversations Integration.
/api/chat/getTwilioToken
Body
Retrieves the Twilio token associated with the passed UID. This is useful for authenticating the user with Twilio.
/api/chat/getUser
Body
Retrieves the Twilio user associated with the passed UID
/api/chat/updateUser
Body
Updates the Twilio user object with the passed user object. This is useful for updating the user's attributes.
/api/chat/createUser
Body
Creates a Twilio user with the specified UID and user name. This is useful for creating a Twilio user for a Firebase user.
/api/chat/getUserConversations
Body
Retrieves the conversations associated with the passed UID. This is useful for retrieving the user's chat history.
/api/chat/createConversation
Body
Creates a conversation with the specified participants. This is useful for creating group chats.
/api/chat/addConversationParticipant
Body
Adds a participant to the specified conversation. This is useful for adding users to group chats.
/api/chat/getConversationParticipants
Body
Retrieves the participants associated with the passed conversation SID. This is useful for retrieving the participants of a group chat.
/api/chat/createConversationMessage
Body
Creates a message for the specified conversation. This is useful for sending messages in a conversation.
/api/chat/getConversationMessages
Body
Retrieves the messages associated with the passed conversation SID. This is useful for retrieving the chat history of a conversation.
/api/chat/markConversationMessagesRead
Body
Marks all messages in a conversation as read for a specific participant. This updates the lastReadMessageIndex for the participant.
/api/chat/deleteAllConversations
Body
Deletes all conversations associated with the specified user. This is useful for removing a user's conversation history completely.