I'm working with some IoT projects and for handling all data I have used Blynk application but now I have created my own app but problem is that I want to add sensor data to firebase, but I have multiple users that's why I want to separate my data for every user, how can i do this, which Library is helpful for this? I have searched on Google for this, but everyone adding data in common database but how to separate the data for multiple users?
1 Answer
To separate data per user in your database, you will want to organize the database reference path to a location relevant to the user uid. if your app supports Auth, you can access this with the currentUser object which should have their uid as a property.
3 Comments
Jaydip Pawar
I have created app using flutter and know how to do it in flutter but I don't know about IoT, I want to code in arduino IDE to send data in firebase for perticular user, so which library is helpful.
DIGI Byte
You will want to look at the REST API, store your auth tokens as values, and pass them in requests firebase.google.com/docs/reference/rest/auth and firebase.google.com/docs/reference/rest/database
DIGI Byte
and a decent tutorial on ESP12 web requests techtutorialsx.com/2016/07/17/esp8266-http-get-requests