• Neblla
  • Installation
  • Examples
  • Reference
  • Pricing
  • Apps
  • Login
Neblla

Managing servers for real-time connections is often complex and time-consuming. With Neblla, you can skip the infrastructure and focus on what really matters — your project, service, or game.

Get started now and have your demo up and running for free in minutes. Neblla’s flexible plans make scaling easy, and you can upgrade whenever you need more capacity.

Getting started with Neblla is quick and effortless. In just a few simple steps, you'll be ready to manage real-time connections:

  1. Sign up: Create your account by signing in with your Google account. No complicated forms required.
  2. Create your app: Simply name your app and you're almost ready to go.
  3. Set your domain: Secure your app by linking it to your domain, ensuring it can't be used elsewhere. You can also use localhost in sandbox mode for development.
  4. Copy your app ID: Use the copy button to grab your app ID, already formatted as a script tag for easy integration.
  5. Paste the tag: Insert the script tag directly into the <head> section of your webpage.
  6. Write your code: In your JavaScript, simply use window.onNeblla = neblla => { ... } to start sending and receiving messages.

And that's it! In just a couple of minutes, Neblla is ready to handle real-time connections for you, saving you all the trouble of setting up and maintaining your own socket server.

Download Chat
Download Capabilities

Free

Enjoy 50K data units every day for free, with your quota refreshing daily.

A data unit is each character sent, whether by you or by the platform, between your device and Neblla, in either direction.

Pro Subscription

Increase your daily quota to 1M data units for $10/month, perfect for production.

On-Demand

Counting on a spike for events, demos, or as a backup safety net? Purchase 10M on-demand data units for $10.

This extra data lasts for a year and is only used after your daily quota is fully consumed.

onNeblla

The onNeblla is a global function that is called when the Neblla object is ready to use. It receives a single argument—the Neblla instance itself. This function is called only once. If onNeblla is defined after Neblla is ready, it will be called as soon as possible.

window.onNeblla = neblla => { neblla.on('message', event => { console.log('Message received:', event.data); }); neblla.sendMessage({ text: 'Hello, Neblla!' }); };

Neblla Class

The Neblla class provides methods and properties to interact with the real-time communication system. You can use it to send messages, manage user data, and handle room memberships.

Methods

  • on(event, callback)
  • off(event, callback)
  • sendMessage(data)
  • identify(user)
  • join(room)
  • leave()

Events

  • 'message'
  • 'dataChanged'
  • 'memberDataChanged'
  • 'joinRoom'
  • 'leaveRoom'
  • 'memberJoinedRoom'
  • 'memberLeftRoom'

Properties

  • neblla.users: An object containing the users in the current room.
  • neblla.room: The name of the current room.

on(event, callback)

Registers an event listener for a specific event.

Parameters

  • event (string): The name of the event to listen for.
  • callback (function): The function to call when the event occurs.

Example

neblla.on('message', event => { console.log('Received message:', event.data); });

off(event, callback)

Removes a previously registered event listener.

Parameters

  • event (string): The name of the event.
  • callback (function): The callback function to remove.

Example

function onMessage(event) { console.log('Received message:', event.data); } neblla.on('message', onMessage); // Later... neblla.off('message', onMessage);

sendMessage(data)

Sends a message to the current room.

Parameters

  • data (object): The message data to send.

Example

neblla.sendMessage({ text: 'Hello, everyone!' });

identify(user)

Updates the user's data.

Parameters

  • user (object): An object containing user data to update.

Example

neblla.identify({ name: 'Alice', age: 30 });

join(room)

Joins a room. If already in a room, it will leave the current room first.

Parameters

  • room (string): The name of the room to join.

Example

neblla.join('general');

leave(room)

Leaves the specified room and returns to the lobby.

Example

neblla.leave();

Events

Neblla emits various events that you can listen to using the on method.

'message'

Fired when a message is received.

Event Object

  • data: The message data.
  • userId: The ID of the user who sent the message.
  • user: The user object of the sender.
  • time: The time the message was sent.
  • self: Boolean indicating if the message was sent by the current user.

Example

neblla.on('message', event => { if (event.self) { console.log('You sent:', event.data); } else { console.log(event.user.name + ' says:', event.data); } });

'dataChanged'

Fired when your user data has changed.

Event Object

  • id: Your user ID.
  • user: Your updated user data.

Example

neblla.on('dataChanged', ({ id, user }) => { console.log('Your data has been updated:', user); });

'memberDataChanged'

Fired when another member's data has changed.

Event Object

  • id: The user ID of the member.
  • user: The updated user data.

Example

neblla.on('memberDataChanged', ({ id, user }) => { console.log('User ' + id + ' updated their data:', user); });

'joinRoom'

Fired when you have successfully joined a room.

Event Object

  • id: Your user ID.
  • user: Your user data.
  • room: The room object you joined.

Example

neblla.on('joinRoom', ({ room }) => { console.log('Joined room:', room.name); });

'leaveRoom'

Fired when you have left a room.

Example

neblla.on('leaveRoom', () => { console.log('You have left the room.'); });

'memberJoinedRoom'

Fired when another member has joined the room.

Event Object

  • id: The user ID of the new member.
  • user: The user data of the new member.

Example

neblla.on('memberJoinedRoom', ({ id, user }) => { console.log(user.name + ' has joined the room.'); });

'memberLeftRoom'

Fired when another member has left the room.

Event Object

  • id: The user ID of the member who left.
  • data: The user data of the member who left.

Example

neblla.on('memberLeftRoom', ({ id, data }) => { console.log('User ' + id + ' has left the room.'); });

Privacy Policy

At Neblla, we take your privacy seriously. This document outlines the type of information we collect and how we use it.

Information We Collect:

  • Developer Information: We only collect the email address and name of developers to identify them as users on our platform.
  • Subscription Information: If you start a subscription, we store your Stripe customer ID and subscription ID to verify the status of your active subscription.

What We Don’t Collect:

We do not store passwords, bank account details, or payment information. All payment details are securely handled by Stripe.

Third-Party Services:

We use third-party services, such as Stripe for payments and Google for authentication.

Stripe and Google may store cookies for authentication and payment purposes. However, Neblla does not collect, compile, or store this information.

We are not associated with the data these services may collect directly.

Data Sharing:

We do not sell, share, or disclose your information to third parties.

For further questions about our privacy policy, feel free to contact us at hello@neblla.com.

+

Edit App

zrr2eGSmTJTX4UC5oof

Free Quota: 50K of 100K

Extra Quota: 0K

Privacy Policy hello@neblla.com