A Realtime Firebase database is a database hosted in the cloud. The data is stored in JSON format and synchronized in real time with each connected client.
The plugin helps you interact with the database from your application by first connecting your account
Go to https://console.firebase.google.com/ and create a new project.
Or use the created one, if you have one.
Follow the instructions and fill in all the necessary fields:
After the project is created, Configure your Realtime Database
The database has a special structure that must be adhered to for proper processing:
You also can find your Firebase project ID in the Firebase Console:
Go to the Firebase Console at https://console.firebase.google.com/.
Select your project from the project list.
Navigate to the project settings or click on the settings icon.
You should see your project ID listed there.
💡
For all API calls, you'll need an Access Token for authorization.
Instructions for obtaining an access token.
In the Firebase console open your app and go to project settings in the settings tab
On the "General" tab, you will see all the necessary information for your plugin.
Copy the Web API Key and paste it into the plugin settings
💡
If “Web API Key” is empty, just go to the “Authentication” section, click “get started”, configure Authentication and after that the key will be there.
How to Configure “Authentication”
Instructions for obtaining “Realtime Database AUTH READ - firebase_secret(path)”
In the Firebase console open your app and go to project settings in the settings tab
On the "Service accounts" tab, at “Database secrets” tab you will have your secret if the previous instructions were followed.
Fill the fields in the bubble app, “plugins” section
Plugin API Calls
Signup a User
Signs up a user in your Firebase project (make sure the authentication is set)
Field title
Description
Type
Email
The email for the user to create.
Text
Password
The password for the user to create (must be at least 6 characters).
Text
Sign a User In
Signs in a user in your Firebase project
Field title
Description
Type
Email
The email the user is signing in with.
Text
Password
The password for the account.
Text
Sign in anonymously
In Firebase Authentication, the "sign-in anonymously" feature allows users to sign in to your Firebase app anonymously, without requiring them to provide any credentials such as an email address or password. When a user signs in anonymously, Firebase generates a unique identifier (UID) for that user session, which can be used to track the user's activity within your app.
💡
Set up your “Authentication” to accept “Anonymous” sign in.
Update User Profile
Allows you to update the user account information for a specific user in your Firebase project and even get back in response the Hash version of user password.
Field title
Description
Type
idToken
A Firebase Auth ID token for the user.
You get it as a response with “Signup a User”/ Sign a User In” / “Sign in anonymously” API calls.
Text
displayName
Updated display name you want to assign to a user.
Text
photoUrl
User's profile new photo URL.
Text
deleteAttribute
List of attributes to delete, "DISPLAY_NAME" or "PHOTO_URL". This will nullify these values.
Text
Get Current User Data
Allows you to retrieve all the user information.
Field title
Description
Type
idToken
A Firebase Auth ID token for the account.
You get it as a response with “Signup a User”/ Sign a User In” / “Sign in anonymously” API calls.
Text
Change Password
Allows you to update the user account password.
💡
You get a new “idToken” and user data after that action, please be aware.
Field title
Description
Type
idToken
A Firebase Auth ID token for the account.
You get it as a response with “Signup a User”/ Sign a User In” / “Sign in anonymously” API calls.
Text
password
User's new password.
Text
Delete User
Allows you delete the user account.
Field title
Description
Type
idToken
A Firebase Auth ID token for the account.
You get it as a response with “Signup a User”/ Sign a User In” / “Sign in anonymously” API calls.
Text
💡
The difference between “PUBLIC” and “AUTH” requests, is that “AUTH” API calls checks whether the requested operation is permitted according to the Firebase Security Rules. If the “access token”/”firebase_secret” mentioned in the API call does not have the necessary permissions, the operation will be denied.
”Public” API calls made without an access key do not check Firebase Security Rules.
Realtime Database PUBLIC READ
The "Realtime Database PUBLIC READ" API call refers to allowing unrestricted public access to read data from a Firebase Realtime Database. This configuration grants read access to all users, regardless of authentication status, making the specified data publicly readable.
Field title
Description
Type
PROJECT_ID
ID assigned to your Firebase project.
Look in “Getting Setup” above to look where you can find it.
Text
/path
Indicate the path trough the "/". For example, consider a chat application that allows users to store a basic profile and contact list. A typical user profile is located at a path, such as /users/uid.
If the path is empty the root data will be read.
Text
Realtime Database Public WRITE
The "Realtime Database Public WRITE" feature allows unrestricted public access to write data to a Firebase Realtime Database. This configuration grants write access to all users, regardless of authentication status, allowing them to add, update, or delete data in the specified database nodes.
Field title
Description
Type
PROJECT_ID
ID assigned to your Firebase project.
Look in “Getting Setup” above to look where you can find it.
Text
/path
Indicate the path trough the "/". For example, consider a chat application that allows users to store a basic profile and contact list. A typical user profile is located at a path, such as /users/uid.
No path writes data to the last database key.
If the path do not exist, it will be created at when the API is called.
Text
body
The JSON object that is going to be written in your database, on the mentioned path.
If on the mentioned path there was already data, it is going to rewrite it, if not to add it.
Object
Realtime Database AUTH READ
The "Realtime Database AUTH READ" call refers to accessing data from a Firebase Realtime Database with authentication enforced for read operations.
This configuration allows only authenticated users, who possess valid credentials (such as a firebase_secret), to read data from the specified database nodes, ensuring data privacy and security.
For this API call “firebase_secret” from the plugin’s set up takes care of the data read permissions.
Field title
Description
Type
PROJECT_ID
ID assigned to your Firebase project.
Look in “Getting Setup” above to look where you can find it.
Text
/path
Indicate the path trough the "/". For example, consider a chat application that allows users to store a basic profile and contact list. A typical user profile is located at a path, such as /users/uid.
If the path is empty the root data will be read.
Text
Realtime Database AUTH WRITE
The "Realtime Database AUTH WRITE" call refers to writing data to a Firebase Realtime Database with authentication enforced for write operations. This configuration allows only authenticated users, who possess valid credentials (such as a user token), to write data to the specified database nodes, ensuring data integrity and security.
Field title
Description
Type
PROJECT_ID
ID assigned to your Firebase project.
Look in “Getting Setup” above to look where you can find it.
Text
/path
Indicate the path trough the "/". For example, consider a chat application that allows users to store a basic profile and contact list. A typical user profile is located at a path, such as /users/uid.
No path writes data to the last database key.
If the path do not exist, it will be created at when the API is called.
Text
access_token
Token obtained through Firebase Authentication. This token is used to authenticate and authorize requests to write data to the Firebase Realtime Database.
Text
body
The JSON object that is going to be written in your database, on the mentioned path.
If on the mentioned path there was already data, it is going to rewrite it, if not to add it.
Object
Realtime Database PUBLIC DELETE
The "Realtime Database PUBLIC DELETE" feature refers to allowing unrestricted public access to delete data from a Firebase Realtime Database. This configuration grants delete access to all users, regardless of authentication status, enabling them to remove data from the specified database nodes.
Field title
Description
Type
PROJECT_ID
ID assigned to your Firebase project.
Look in “Getting Setup” above to look where you can find it.
Text
/path
Indicate the path trough the "/". For example, consider a chat application that allows users to store a basic profile and contact list. A typical user profile is located at a path, such as /users/uid.
Text
Realtime Database AUTH DELETE
The "Realtime Database AUTH DELETE" refers to allowing authenticated users, who possess valid credentials such as a user token obtained through Firebase Authentication, to delete data from a Firebase Realtime Database. This configuration restricts deletion access to only authenticated users, ensuring that only users with appropriate permissions can remove data from the specified database nodes.
Field title
Description
Type
PROJECT_ID
ID assigned to your Firebase project.
Look in “Getting Setup” above to look where you can find it.
Text
/path
Indicate the path trough the "/". For example, consider a chat application that allows users to store a basic profile and contact list. A typical user profile is located at a path, such as /users/uid.
Text
access_token
Token obtained as response through Firebase Authentication - "idToken".
Text
💡
The difference between “WRITE” and “UPDATE” functions is that “WRITE” replaces the entire resource with the new data provided in the request body while “UPDATE” applies partial modifications to an existing resource, updating only the specified fields or attributes with the new data provided in the request body.
Realtime Database PUBLIC UPDATE
The "Realtime Database PUBLIC UPDATE" refers to allowing unrestricted public access to update (modify) data in a Firebase Realtime Database. With this configuration, any user, without the need for authentication, can make changes to the specified database nodes. It grants write access to all users, enabling them to update data without providing any credentials.
Field title
Description
Type
PROJECT_ID
ID assigned to your Firebase project.
Look in “Getting Setup” above to look where you can find it.
Text
/path
Indicate the path trough the "/". For example, consider a chat application that allows users to store a basic profile and contact list. A typical user profile is located at a path, such as /users/uid.
Text
body
The JSON object that has the changed object with modified data.
Object
Realtime Database AUTH UPDATE
The "Realtime Database PUBLIC UPDATE" refers to allowing unrestricted public access to update (modify) data in a Firebase Realtime Database. With this configuration, any user, without the need for authentication, can make changes to the specified database nodes. It grants write access to all users, enabling them to update data without providing any credentials.
Field title
Description
Type
PROJECT_ID
ID assigned to your Firebase project.
Look in “Getting Setup” above to look where you can find it.
Text
/path
Indicate the path trough the "/". For example, consider a chat application that allows users to store a basic profile and contact list. A typical user profile is located at a path, such as /users/uid.
Text
access_token
Token obtained as response through Firebase Authentication - "idToken".
Text
body
The JSON object that has the changed object with modified data.
Object
Get account UID
Retrieves the UID (User ID) associated with a user's account in Firebase.
Field title
Description
Type
refresh_token
When a user signs in or signs up, Firebase Authentication provides a refresh token.