Send messages
Sending messages requires knowing the channel name and having an actual message you wish to send. There is no specific mechanism to create new channels - they are created automatically by simply subscribing, or publishing to a new channel name.
The publish
function lets you specify all of the above, and then send the message. After sending a message, PubNub servers return a message timetoken, which lets you do further actions like retrieving/auditing messages at a later date.
Messages are received using a listener. The interactive section below will automatically create a message listener for you.
Try it out
Change the
text
attribute in the message bodyPublish your message
Add other JSON to the
message
to publish across multiple attributes
See for yourself
You can publish the same thing with this curl
command.