Text Message

Initiate the messaging with the following scripts, depending on your platform of choice.

let messageId = messageRepository.createTextMessage(withChannelId: "channel-123",
                                                             text: "Hi Amity!!", 
                                                             tags: nil, 
                                                             parentId: nil) { message, error in
     // Handle message creation result.
}

token = messageRepository.getMessage(messageId)?.observe { liveMessage, error in
    // Observe message data changes.
}

The limit for sending text messages is 20,000 characters per text message. Messages exceeding that limit will return an error and will not be sent.

Last updated