Skip to content
Firebase cloud functions for Chat21
Branch: master
Clone or download
Latest commit 23594bc Mar 15, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
functions click action parameter Mar 14, 2019
public created different file for index.js Feb 15, 2018
.gitignore fix Apr 5, 2018 r up Feb 7, 2018
LICENSE Create LICENSE Feb 15, 2018 Update Mar 15, 2019 ping script Jul 13, 2018
database.rules.json generate the bot removing BUG becasue mombers count become 4 and bot… Jul 30, 2018
firebase.json fix override issue for ionic chat Jan 16, 2018
package.json 1.0.4 Feb 19, 2019

npm version

Chat21 is the core of the open source live chat platform


Chat21-cloud function is the backend module required for the operation of the other chat21 modules.

  • Send a direct message
  • Send a group message
  • Create a conversation for each message
  • Send the push notification for direct and group message
  • Send an info message to notify the creation of a group or a member joining

Pre requisites

You can find more info about Firebase Functions here

Project setup

  • Clone or download this repo from github
  • Run from command line:
cd functions 
npm install
  • Login to Firebase CLI with firebase login. More info here
  • Set up your Firebase project by running firebase use --add, select your Project ID and follow the instructions.


  • Deploy to Firebase using the following command: firebase deploy. You can see the deployed functions on the Firebase Console under Functions menu.


Send your first message

  • Create a new user on the Firebase Console under Authentication Menu.
  • Select Email/Password for Authentication Provider
  • Click on "Add New User" and populate Email and Password field with for example : email =, password = 123456
  • Get a JWT token calling JWT Authentication method as described here JWT Authentication
  • Sending a new message using Send Message API with JWT Authentication as described here Send message

Advanced Setup Options

Read the Setup Options page


Read the REST API page

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.