Hi
I have configured the cloud messaging demo application with Firebase console JSON and build has been generated but i am unable to send push notification. I am getting an error as Firebase entity is empty can anyone help me on this to overcome this issue. What should be in service account file attribute of Firebase entity.
Hello, This might help you to get the solution Service Account File:
The service account file is a JSON file containing the credentials required for server-to-server communication with Firebase services.
To obtain this file - Go to the Firebase console (https://console.firebase.google.com/). > Select your project > Navigate to Project settings > Service accounts. > Under "Firebase Admin SDK," click on "Generate new private key" This will download a JSON file to your computer.
You need to create a Firebase entity in OutSystems and configure it with the settings obtained from the Firebase console. > Create a new entity named "Firebase" or similar. > Add attributes to this entity such as Project ID, FCM sender ID, and Service Account File. > For the Service Account File attribute, it should be of the type Binary Data > Upload the JSON file downloaded from the Firebase console to populate this attribute.
Ensure that you correctly set up the data type and attribute properties to handle binary data.
Check that you are correctly mapping the attributes of the Firebase entity to the corresponding settings from the Firebase console.
Verify that the Service Account File attribute is properly configured to store the binary data from the JSON file.
Use the appropriate actions or integrations provided by the OutSystems Forge component you are using for Firebase Cloud Messaging.
Monitor any error messages or logs to identify and troubleshoot any issues that arise during the push notification sending process. Cheers, Shriyash Dixit
Hi Shriyash
Its working now Thanks for your response.
Welcome!
can you give me information about how to send push notifications using FCM token
or any other way to do this.
Hi,
You have a entity 'Firebase', which is only used to retrieve the data. I do not see any values your creating/inserting in that by using Create or Update method if entity. So you need to add some values if you want to retrieve the data else it will return empty. Also you should also do a empty check after retrieving the value to avoid the error.
ThanksPankaj
Hi Pankaj Jain
Thank you for your responseMy doubt is what value need to be inserted to that entity what is meant by service account file where can i get that binary file.
Project ID & JSON file & FCM sender ID all these three i got from firebase console but i don't know where to get that service account binary file.
hii
i got error when i use this onecannot read properties of undefined (reading 'OSFirebaseCloudMessaging')