Messaging
Get Channel Messages
GET
https://api.talkplus.io/v1.4/api/channels/:channelId/messages
Path Parameters
Name | Type | Description |
---|---|---|
channelId* | string |
Query Parameters
Name | Type | Description |
---|---|---|
limit | string | number of messages to fetch. Default: 20, max: 50 |
lastMessageId | integer | Last message ID to query from (use for pagination) |
order | string | Default Message order: latest latest: called without lastMessageId : most recent messages called with lastMessageId : most recent messages before lastMessageId oldest: called without lastMessageId : oldest messages called with lastMessageId: oldest messages after lastMessageId |
Headers
Name | Type | Description |
---|---|---|
app-id* | string | App ID |
api-key* | string | App API key |
Get Channel Message
GET
https://api.talkplus.io/v1.4/api/channels/:channelId/message/:messageId
Path Parameters
Name | Type | Description |
---|---|---|
channelId* | string | |
messageId* | string |
Headers
Name | Type | Description |
---|---|---|
app-id* | string | App ID |
api-key* | string | App API key |
Send Channel Message
POST
https://api.talkplus.io/v1.4/api/channels/:channelId/messages/send
The following message types are supported: text, hidden, custom and admin.
Push notification is not sent for hidden message type.
admin message type can only be sent from TalkPlus dashboard or by calling REST API (/v1/api/channels/{channelId}/messages/admin/send)
You can enter up to 10 key-value pairs in data field. The maximum size of key is 128 characters and the maximum size of value is 1024 characters. Both key and value must be strings.
Both message text and data cannot be empty when sending a message.
The maximum allowed length of message text is 8192 characters.
Message translation feature is provided through Google Cloud Translation. To use this feature, register an appropriate Google Cloud Service Account Key on our dashboard.
Enter the language code (ISO-639) values in translationTargetLanguages parameter to translate the message text.
Supported languages (ISO-639) can be found here.
Path Parameters
Name | Type | Description |
---|---|---|
channelId* | string |
Headers
Name | Type | Description |
---|---|---|
content-type | string | application/json |
app-id* | string | App ID |
api-key* | string | App API key |
Request Body
Name | Type | Description |
---|---|---|
senderId* | string | message sender user ID |
type* | string | message type |
text | string | message text |
data | object | key-value data |
mentions | array | array of user IDs to mention |
fileUrl | string | manually set file URL |
translationTargetLanguages | array | languages to be translated (requires enabling the translation feature in the dashboard) |
Send File Message
POST
https://api.talkplus.io/v1.4/api/channels/:channelId/messages/send
In case of image file upload, Content-Type must be multipart/form-data.
Maximum upload size is 15MB.
The following message types are supported: text, hidden, custom and admin.
Push notification is not sent for hidden message type.
admin message type can only be sent from TalkPlus dashboard or by calling REST API (/v1/api/channels/{channelId}/messages/admin/send)
You can enter up to 10 key-value pairs in data field. The maximum size of key is 128 characters and the maximum size of value is 1024 characters. Both key and value must be strings.
Both message text and data cannot be empty when sending a message.
The maximum allowed length of message text is 8192 characters.
Message translation feature is provided through Google Cloud Translation. To use this feature, register an appropriate Google Cloud Service Account Key on our dashboard.
Enter the language code (ISO-639) values in translationTargetLanguages parameter to translate the message text.
Supported languages (ISO-639) can be found here.
Path Parameters
Name | Type | Description |
---|---|---|
channelId* | string |
Headers
Name | Type | Description |
---|---|---|
content-type* | string | must be "multipart/form-data" |
app-id* | string | App ID |
api-key* | string | App API Key |
Request Body
Name | Type | Description |
---|---|---|
senderId* | string | message sender user ID |
type* | string | message type |
text | string | message text |
data | string | JSON formatted string |
file* | string | file |
file-content-type | string | file content-type. If not specified, TalkPlus server will try to determine the file type. |
mentions | array | array of user IDs to mention |
translationTargetLanguages | array | languages to be translated (requires enabling the translation feature in the dashboard) |
Send Channel Admin Message
POST
https://api.talkplus.io/v1.4/api/channels/:channelId/messages/admin/send
You can send an
admin
oradmin_hidden
type message.admin_hidden
type message does not increaseunreadCount
field for members in the channel.Sender will be admin account associated with app. (you can edit admin user information in dashboard)
The maximum allowed length of message text is 8192 characters.
You can enter up to 5 key-value pairs in data field. The maximum size of key is 128 characters and the maximum size of value is 1024 characters. Both key and value must be strings.
Both message text and data cannot be empty when sending a message.
The maximum allowed length of message text is 8192 characters.
Message translation feature is provided through Google Cloud Translation. To use this feature, register an appropriate Google Cloud Service Account Key on our dashboard.
Enter the language code (ISO-639) values in translationTargetLanguages parameter to translate the message text.
Supported languages (ISO-639) can be found here.
Path Parameters
Name | Type | Description |
---|---|---|
channelId* | string |
Headers
Name | Type | Description |
---|---|---|
content-type | string | application/json |
app-id* | string | App ID |
api-key* | string | App API key |
Request Body
Name | Type | Description |
---|---|---|
text | string | message text |
data | object | key-value data |
mentions | array | array of user IDs to mention |
disablePushNotification | bool | set this to true to disable push notification for this message |
type | string |
|
fileUrl | string | manually set file URL |
translationTargetLanguages | array | languages to be translated (requires enabling the translation feature in the dashboard) |
Delete Channel Message
DELETE
https://api.talkplus.io/v1.4/api/channels/:channelId/messages/:messageId
Path Parameters
Name | Type | Description |
---|---|---|
channelId* | string | |
messageId* | string |
Headers
Name | Type | Description |
---|---|---|
content-type | string | application/json |
app-id* | string | App ID |
api-key* | string | App API key |
Request Body
Name | Type | Description |
---|---|---|
text | string | message text |
data | object | key-value data |
Last updated