# Adding a chat message api to my app

**URL:** <https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913>\
**Category:** Questions about Thunkable X\
**Tags:** firebase\
**Created:** [December 7, 2020, 8:25pm UTC](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913 "2020-12-07T20:25:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![oreeldadln](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/oreeldadln/32/89185_2.png) [@oreeldadln](https://community.thunkable.com/u/oreeldadln)\
**Post date:** [December 7, 2020, 8:25pm UTC](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913/1 "2020-12-07T20:25:55Z")

</div>

Hello,

does anyone have experience with adding a chat messaging feature into their app?  
I want to add this feature and the best way that I thought to do so is by using a real-time chat messaging service API.  
is it possible to do such a thing?  
did someone try it?

Thank you!

---

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [December 7, 2020, 10:10pm UTC](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913/2 "2020-12-07T22:10:10Z")

</div>

The web api component can work with most REST APIs. I built chat with real-time db and one signal. It is a little tricky with thunkable, but it is doable

---

<div class="post-metadata">

**Author:** ![oreeldadln](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/oreeldadln/32/89185_2.png) [@oreeldadln](https://community.thunkable.com/u/oreeldadln)\
**Post date:** [December 7, 2020, 11:00pm UTC](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913/3 "2020-12-07T23:00:08Z")

</div>

Is it working well?  
Like the average chat messaging app?

Can you explain how to build such a thing?

---

<div class="post-metadata">

**Author:** ![luv.ak.tech](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/luv.ak.tech/32/104896_2.png) [@luv.ak.tech](https://community.thunkable.com/u/luv.ak.tech)\
**Post date:** [December 8, 2020, 4:14am UTC](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913/4 "2020-12-08T04:14:21Z")

</div>

you can try some of my web api apps for start  
weather app - [Weather App with web api](http://community.thunkable.com/t/weather-app-with-web-api/908844)  
Lyrics app - [A Lyrics app with web api](http://community.thunkable.com/t/a-lyrics-app-with-web-api/908859)

---

<div class="post-metadata">

**Author:** ![eko.devs.apploroceo](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eko.devs.apploroceo/32/93147_2.png) [@eko.devs.apploroceo](https://community.thunkable.com/u/eko.devs.apploroceo)\
**Post date:** [December 8, 2020, 5:25am UTC](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913/5 "2020-12-08T05:25:10Z")

</div>

how it can help him?

> [@oreeldadln](#):
>
> service API.

with [firebase.io](http://firebase.io)

> [@oreeldadln](#):
>
> did someone try it?
> 
> Thank you!

yp i did in html

> [@oreeldadln](#):
>
> does anyone have experience with adding a chat messaging feature into their app?

lets take it as a challenge  
yey  
but im on computer ill connect to laptop at ight aand show u

---

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [December 8, 2020, 9:31am UTC](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913/6 "2020-12-08T09:31:13Z")

</div>

Building a fully functional multiple user chat app is extremely complicated. You should search this forum for links to the simple chat app example created by the thunkable staff to get started.

To build a multi user chat app with notifications, you will first need to study and understand the following Thunkable topics:

1. Cloud variables
2. JSON objects, properties, and arrays (lists)
3. Cloning and create blocks
4. Firebase authentication (sign in)
5. Firebase realtime db listeners
6. Web API calls
7. One signal push notifications
8. Asynchronous block management

The forum has a lot of good examples for all of these features, as well as the thunkable documentation.

After you are comfortable with all of these features, you can start putting them together for your app.

As you progress, try to ask very specific questions in the forum. The more specific your question, the better answers you will get.

Happy Thunking!

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [December 8, 2020, 9:54am UTC](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913/7 "2020-12-08T09:54:49Z")

</div>

A good starting example is Gram

> [@\[Public\] Gram has hit over 1k shares -- to celebrate we made a few updates](http://community.thunkable.com/t/public-gram-has-hit-over-1k-shares-to-celebrate-we-made-a-few-updates/28368):
>
> Hey Thunkers, Thanks for copying and remixing Gram, what photo sharing should be – ad-free, auto-captioning and secure. This app features the Sign In component with Realtime DB both powered by Firebase, Image Recognizer by Microsoft and a way to “heart” photos. Thunkers must create their own Firebase account and add their own API keys and database url in their account settings. Due to the great response, we made some updates to the original app including adding the ability to like photos, aut…

---

<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:** [December 8, 2020, 6:40pm UTC](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913/8 "2020-12-08T18:40:48Z")

</div>

> [@drted](#):
>
> - Firebase realtime db listeners

@drted Do you have any suggestions for how to make a listener now that the Realtime DB block no longer exists? I went with a Forever loop and a moderate wait time (Wait 3 seconds) and checked the value of a specific field in Firebase that I knew would change (gameData/Games/[game ID]/CurrentPlay). But I wish there was just a listener block. The “when cloud variable initializes or changes” doesn’t seem to fire when a nested field within gameData changes value.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [December 8, 2020, 7:04pm UTC](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913/9 "2020-12-08T19:04:42Z")

</div>

The cloud variables have Initialise or Change event which replaces the listeners in most of the cases.

---

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [December 8, 2020, 7:54pm UTC](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913/10 "2020-12-08T19:54:35Z")

</div>

Frankly I really hope the drag and drop won’t become the default. It has a bunch of bugs, renders differently on all 3 platforms, and is all but unusable for dynamic data driven forms. So the missing listener isn’t an issue I am looking into just yet.

---

<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:** [December 8, 2020, 7:58pm UTC](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913/11 "2020-12-08T19:58:59Z")

</div>

I’m trying to avoid drag-and-drop for now. But even without it enabled, I don’t see the Realtime DB block.

---

<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:** [December 8, 2020, 7:59pm UTC](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913/12 "2020-12-08T19:59:21Z")

</div>

That’s what I thought but I haven’t been able to get them to work.

---

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [December 8, 2020, 9:07pm UTC](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913/13 "2020-12-08T21:07:07Z")

</div>

Whoops yeah, that is the new invisible component move. My bad. If you turn off the setting the firebase blocks will reappear. Or add a saved screen with the realtime db to the project

---

<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:** [December 9, 2020, 12:04am UTC](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913/14 "2020-12-09T00:04:07Z")

</div>

Hmm… that sounds promising but I tried it and it’s still not responding to changes in Firebase:

 ![Screen Shot 2020-12-08 at 4.03.28 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/5/a55d80e7112bcb8f0763db2501523702a213f015.png)

I’m currently testing it as a published Web App. When I change a value in Firebase via blocks or manually from the Firebase console, the “Debug label” doesn’t change.

---

<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:** [December 9, 2020, 1:01am UTC](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913/15 "2020-12-09T01:01:39Z")

</div>

Alright, I got it working. I had to add the listener block for the key. I was wondering how the DataChanged block knew which key(s) to track.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [December 9, 2020, 3:10am UTC](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913/16 "2020-12-09T03:10:20Z")

</div>

@tatiang,  
You need first add a key to the listener then you can track DataChanged event.

![assets_-LAn5scXl2uqUJUOqkJo_-LAn5wecEraNWaG7Ig2g_-LAn6IAxsR6lSVxCQb22_firebase-✕-fig-13](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/1/01e52e2a1ef0930d94193ad74c57dc8d9597b5b6.png)

---

<div class="post-metadata">

**Author:** ![parakharushi2009i](https://avatars.discourse-cdn.com/v4/letter/p/eada6e/32.png) [@parakharushi2009i](https://community.thunkable.com/u/parakharushi2009i)\
**Post date:** [December 15, 2020, 5:01am UTC](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913/17 "2020-12-15T05:01:29Z")

</div>

how can we make a real time chat app like whatsapp

---

<div class="post-metadata">

**Author:** ![luv.ak.tech](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/luv.ak.tech/32/104896_2.png) [@luv.ak.tech](https://community.thunkable.com/u/luv.ak.tech)\
**Post date:** [December 15, 2020, 5:19am UTC](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913/18 "2020-12-15T05:19:31Z")

</div>

welcome to our community @parakharushi2009i  
are you asking about all the features of whatsapp to make in thunkable?  
if yes then we cant because thunkable does not support video call and file picker

---

<div class="post-metadata">

**Author:** ![eko.devs.apploroceo](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eko.devs.apploroceo/32/93147_2.png) [@eko.devs.apploroceo](https://community.thunkable.com/u/eko.devs.apploroceo)\
**Post date:** [December 15, 2020, 5:21am UTC](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913/19 "2020-12-15T05:21:09Z")

</div>

bro simply use firebase and take api from it

---

<div class="post-metadata">

**Author:** ![eko.devs.apploroceo](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eko.devs.apploroceo/32/93147_2.png) [@eko.devs.apploroceo](https://community.thunkable.com/u/eko.devs.apploroceo)\
**Post date:** [December 15, 2020, 5:22am UTC](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913/20 "2020-12-15T05:22:25Z")

</div>

> [@luv.ak.tech](#):
>
> whatsapp to make in thunkable?  
> if yes then we cant because thunkable does not support video call and file picker

itz possible  
just u need tons of coding and im very busy nowa days else i could have helpped

[Next page](https://community.thunkable.com/t/adding-a-chat-message-api-to-my-app/1026913.md?page=2)
