Is there is a way to get unique ID from firebase

im not taking about user UID.
i read this post push - Firebase: how to generate a unique numeric ID for key? - Stack Overflow
about getting unique id from firebase through push() function
question is if we can perform it from kodular to get somthing like this: -JRHTHaKuITFIhnj02kE



What do you think about this :-
These are unique numbers.
You can generate with clock system time block.

its also good idea. but im not sure how much unique it is, no option at all that 2 users will generate the same timestamp on the same time?
just if anyone ask himself how…

Can I know why do you need this?
It will help to understand well.
I used this to make a Chat app.
Otherwise you can directly get ’ unique id ’ by this block

1 Like

You can generate new ID by using random digits and then you can check them in firebase that is it present or not for every execution.

1 Like

Well you have this option as well.

1 Like

so the aswer for main question is “no” haha
thanks, i will choose the best option from here

does any one know that
how to generate unique realtime database “post Id”

1 Like

Hey i lso want unique post id but i am not getting any information about it

1 Like

1.Device IMEI/ Firebase auth user id
2.TimeStamp (better if you get online time)

1 Like

you can use


by this you can generate unique post id for each user in your app

and also user
$postId wild card in database rules

Note timestamp should be in milliseconds

do you want to ownership of post by the user who post and only he can write?

if yes

        ".write" : "root.child('users').child(auth.uid).child('posts').child($postId).child('Own').val() === true ",
1 Like

Builders like Kodular or Other are not supported to generate such id…

So user this method For generate it. It is quite simple but this method generate it.
Use Web Connectivity to perform this operation

To generate a unique , timestamp-based key for every child added to a Firebase database reference we can send a POST request. For our users path, it made sense to define our own keys since each user has a unique username. But when users add blog posts to the app, we’ll use a POST request to auto-generate a key for each blog post:

curl -X POST -d '{
  "author": "alanisawesome",
  "title": "The Turing Machine",
}' ''

Our posts path now has the following data:

  "posts": {
    "-JSOpn9ZC54A4P4RoqVa": {
      "author": "alanisawesome",
      "title": "The Turing Machine"

Notice that the key -JSOpn9ZC54A4P4RoqVa was automatically generated for us because we used a POST request. A successful request will be indicated by a 200 OK HTTP status code, and the response will contain the key of the new data that was added:


Source : Firebase Saving Data  |  Firebase