Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
titleSend a message using a bot
linenumberstrue
// POST https://api.flock.co/v1/chat.sendMessage {
    "to": "<recipient identifier>",
    "text": "<message text>"
}HTTP/1.1
Host: api.flock.co
Content-Type: application/x-www-form-urlencoded
Content-Length: 70
 
to=u:513a9f4ae409&text=hello&token=632542db-1a23-4e06-8b39-01f8b0868d57

To receive a message, listen for the chat.receiveMessage event on your event listener URL.

...