Managing your group chat messages using RumbleTalk RESTful API


Send a system message to a group chat

POST
https://api.rumbletalk.com/chats/{chatId}/messages

Request format

  • Parameter
  • Type
  • Description
  • *text
  • string
  • The system message text
    * Messages are limited to 2000 bytes in length.
  • username
  • string
  • The displayed username
  • image
  • string
  • The displayed image
    * The username field is required for this field to display

Response format

  • Parameter
  • Type
  • Description
  • status
  • boolean
  • true on success, false otherwise

cURL example

curl \ -X POST \ "https://api.rumbletalk.com/chats/123/messages" \ -H "Authorization: Bearer <token>" \ -d "{\"text\":\"Hello World!\"}"

Response example

{ "status": true }

Reading your group chat messages [deprecated]

Do NOT use this route. Use the fast route instead
GET
https://api.rumbletalk.com/chats/{chatId}/messages

Response format

  • Parameter
  • Type
  • Description
  • status
  • boolean
  • true on success, false otherwise
  • count
  • integer
  • Total number of chats in the query
  • data
  • array
  • An array of objects, each representing a chat

Format of the data parameter

  • Parameter
  • Type
  • Description
  • messageId
  • integer
  • The ID of the message
  • time
  • timestamp
  • The date and time the message was posted on
  • userId
  • integer
  • The ID of the user who posted the message
  • image
  • string
  • The URL of the image of the user who posted the message
  • userName
  • string
  • The username of the user who posted the message
  • text
  • string
  • The message text

cURL example

curl \ -X GET \ "https://api.rumbletalk.com/chats/123/messages" \ -H "Authorization: Bearer <token>"

Response example

{ "status": true, "count": 2, "data": [ { "messageId": 654, "time": 1458934376, "userId": 1, "image": null, "userName": "John", "text": "Hello World!" }, ... ] }

Reading your group chat messages fast

GET
https://api.rumbletalk.com/chats/{chatId}/messages?fast=true
This route uses a different querying mechanism.
  • You can limit the results count using the limit parameter.
  • You can select different time ranges using the from parameter and the to parameter. Both parameters take timestamps as values. You can use one, both, or none of them.
  • Another available parameters is the reverse parameter, which changes the order in which the results are queried.
  • And lastly, the next parameter let's you fetch the next set of results. The value of this parameter should be the string received in the next parameter of the response; and will be available iff there is a next set of restuls.

Response format

  • Parameter
  • Type
  • Description
  • status
  • boolean
  • true on success, false otherwise
  • count
  • integer
  • Total number of chats in the query
  • data
  • array
  • An array of objects, each representing a chat

Format of the data parameter

  • Parameter
  • Type
  • Description
  • messageId
  • integer
  • The ID of the message
  • time
  • timestamp
  • The date and time the message was posted on
  • userId
  • integer
  • The ID of the user who posted the message
  • image
  • string
  • The URL of the image of the user who posted the message
  • userName
  • string
  • The username of the user who posted the message
  • text
  • string
  • The message text

cURL example

curl \ -X GET \ "https://api.rumbletalk.com/chats/123/messages?fast=true" \ -H "Authorization: Bearer <token>"

Response example

{ "status": true, "count": 2, "data": [ { "messageId": 654, "time": 1458934376, "userId": 1, "image": null, "userName": "John", "text": "Hello World!" }, ... ], "next": "..." }

Deleting a message from a group chat

DELETE
https://api.rumbletalk.com/chats/{chatId}/messages/{messageId}

Response format

  • Parameter
  • Type
  • Description
  • status
  • boolean
  • true on success, false otherwise

cURL example

curl \ -X DELETE \ "https://api.rumbletalk.com/chats/123/messages/654" \ -H "Authorization: Bearer <token>"

Response example

{ "status": true }

Deleting a few messages from a group chat

POST
https://api.rumbletalk.com/chats/{chatId}/messages/delete

Request format

Array of message IDs
* Limited to 25 messages per request

Response format

  • Parameter
  • Type
  • Description
  • status
  • boolean
  • true on success, false otherwise

cURL example

curl \ -X POST \ "https://api.rumbletalk.com/chats/123/messages/delete" \ -H "Authorization: Bearer <token>" \ -d "[1, 2, 3]"

Response example

{ "status": true }

Delete all messages from a group chat

This method is irreversible and should be handled with care

DELETE
https://api.rumbletalk.com/chats/{chatId}/messages

Response format

  • Parameter
  • Type
  • Description
  • status
  • boolean
  • true on success, false otherwise

cURL example

curl \ -X DELETE \ "https://api.rumbletalk.com/chats/123/messages/654" \ -H "Authorization: Bearer <token>"

Response example

{ "status": true }