Babel is an open source chat widget and API built with the PubNub Global Realtime Network. Babel let's you send Self-Destructing Messages, and also helps facilitate public key exchange.

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
  1. <script src="pubnub.js"></script>
  2. <script src="cryptico.js"></script>
  3. <script src="babel.js"></script>

  4. <script>
  5. var babel = new Babel('bob');
  6. </script>
Self-Destructing Chat in 2 Steps

Add Encrypted, Self-Destructing messaging in just 2 steps.

  • Import the Babel, PubNub, and Cryptico SDKs.
  • Initialize an instance of Babel.
  • Now you're ready to send messages!

    Public Key Exchange

    Babel uses 1024-bit RSA encryption to encrypt the messages it sends. However, if you would like, you could get these keys and use them for other purposes.

    listUsers() Returns an object containing users and their respective keys.
    myKey() Returns your Cryptico RSAkey.

    Sending and Receiving Messages

    sendMessage(recipient, message, ttl) Sends message to recipient. After ttl seconds the message will self-destruct.
    returnMessages() Returns all messages that haven't self-destructed yet.
    onRecieveMessage(callback) callback will be called whenever you receive a message.


    listUsers() Returns a list of all users currently connected to Babel.
    onPresence(callback) callback will be called whenever a user joins or leaves.
    For a more detailed overview of the Babel API, check out the README on GitHub.

    Start Building Real-time Apps Now!