Sending messages
Once your users are subscribed to a channel or two, you can send messages to them!
Last updated
Was this helpful?
Once your users are subscribed to a channel or two, you can send messages to them!
Last updated
Was this helpful?
Think of a message as a standard that is triggered externally. It can even contain data to populate the page, but you don't have to wait for a user to click a button, run a utility hook, or even poll your server for updates on a set interval.
The BF action messageSend can be used to send a message to channel or channels. It requires a channel key to be set under options.
options.channel
The BF action messageSendAnonChannel can be used to send a message to channel or channels. It requires a channel key to be set under options.
options.channel
The script is available in Helper file and is called API - Send Message. This script accepts an object with four keys message, channels, apiKey and domain.
message
: it accepts an object with:
actions
: array of BF action objects;
model
: object with model data;
app
: object with app model data.
channels
: string of channel name or array of strings;
apiKey
: API key from corresponding app;
domain
: domain to send message to.
POST
https://yourdomain.com/message/sendmessage
accept
string
application/json
content-type
string
application/json
apiKey
string
the API key for the corresponding app
channels
array
array of channel names
message
string
JSON object to be sent
message.actions
array
JSON for an array of BF action objects
message.model
object
JSON object with data to be merged to model data
message.app
array
JSON object with data to be merged to app model data