# Trying to fetch user data from firebase realtime database but giving null value

**URL:** <https://community.thunkable.com/t/trying-to-fetch-user-data-from-firebase-realtime-database-but-giving-null-value/3157616>\
**Category:** Questions about Thunkable X\
**Tags:** firebase, database, beginner, help\
**Created:** [August 25, 2024, 6:29am UTC](https://community.thunkable.com/t/trying-to-fetch-user-data-from-firebase-realtime-database-but-giving-null-value/3157616 "2024-08-25T06:29:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yasarbains7mhf9pj](https://avatars.discourse-cdn.com/v4/letter/y/58f4c7/32.png) [@yasarbains7mhf9pj](https://community.thunkable.com/u/yasarbains7mhf9pj)\
**Post date:** [August 25, 2024, 6:29am UTC](https://community.thunkable.com/t/trying-to-fetch-user-data-from-firebase-realtime-database-but-giving-null-value/3157616/1 "2024-08-25T06:29:58Z")

</div>

Hi, I am trying to fetch user data for user profile from firebase realtime database. But I am unable to navigate to the exact data properly, which results in giving null value.  
Please help me out.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/c/ec5eba5702290f5abfb31171b5cd66cc3d1e398e.png)  
This is how the database in firebase looks like, and I want to fetch Firstname, also email address will be unique for each user.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/6/664264a271c13912f1952ec5fe69de460d9bd990.png)  
This is how my block looks like.

Please help me out with this.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [August 25, 2024, 6:58am UTC](https://community.thunkable.com/t/trying-to-fetch-user-data-from-firebase-realtime-database-but-giving-null-value/3157616/2 "2024-08-25T06:58:51Z")

</div>

You need to use cloud variables to access Firebase data. The name of the cloud variable should be the path to the value you want to retrieve. That can look something like this:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/8/e87e724cc61f163ccfaaf219c2ed2abb1f021037.png)

Or you can do this with `get property of object` blocks. Follow the tutorial here: [Connect a Firebase Realtime Database | Thunkable Docs](https://docs.thunkable.com/blocks/blocks/variables-overview/connect-a-firebase-realtime-database#video-tutorials)

---

<div class="post-metadata">

**Author:** ![yasarbains7mhf9pj](https://avatars.discourse-cdn.com/v4/letter/y/58f4c7/32.png) [@yasarbains7mhf9pj](https://community.thunkable.com/u/yasarbains7mhf9pj)\
**Post date:** [August 25, 2024, 7:13am UTC](https://community.thunkable.com/t/trying-to-fetch-user-data-from-firebase-realtime-database-but-giving-null-value/3157616/3 "2024-08-25T07:13:49Z")

</div>

It was really helpful. Thanks 😀

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [November 23, 2024, 7:14am UTC](https://community.thunkable.com/t/trying-to-fetch-user-data-from-firebase-realtime-database-but-giving-null-value/3157616/4 "2024-11-23T07:14:36Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
