When you access Firebase using Thunkable you supply API key and Database URL.
The API key is used to create either an Auth token or a User token or both. however, these tokens are only required if you set the Rules in Firebase to deny anonymous access but if you allow access without any authentication then you can actually use the Web API
component to get data from the database.
For Example, I have a test database that I do not use any security in it. See the rules:
{
"rules": {
".read": "true",
".write": "true",
}
}
So, I allow everyone to read or write to this database. In this case, I can get data just by using the Database URL and add to it the keys I want to retrieve and add to the end .json
Example:
My test database is my-demodb and I want to retrieve the key myBook/Students so the full URL will be
https://my-demodb-9d875-default-rtdb.firebaseio.com/myBook/Students.json
I used this code to get a list of the students key
This is the output from my mobile
Now, when you have security in place then you will need one of the methods to generate a token to access your data. I might write a more descriptive post about how to access using tokens.
To read about Auth API see this
https://firebase.google.com/docs/reference/rest/auth