# How do I use the API bubble?

**URL:** <https://forum.ideta.io/t/how-do-i-use-the-api-bubble/79>\
**Category:** Developers Corner\
**Created:** [December 21, 2021, 4:08pm UTC](https://forum.ideta.io/t/how-do-i-use-the-api-bubble/79 "2021-12-21T16:08:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glen](https://avatars.discourse-cdn.com/v4/letter/g/8c91f0/32.png) [@Glen](https://forum.ideta.io/u/Glen)\
**Post date:** [December 21, 2021, 4:08pm UTC](https://forum.ideta.io/t/how-do-i-use-the-api-bubble/79/1 "2021-12-21T16:08:15Z")

</div>

I would like to know what I can do with the API bubble.

---

<div class="post-metadata">

**Author:** ![Badr](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Badr](https://forum.ideta.io/u/Badr)\
**Post date:** [December 21, 2021, 6:31pm UTC](https://forum.ideta.io/t/how-do-i-use-the-api-bubble/79/2 "2021-12-21T18:31:12Z")

</div>

Hello Glen, the API bubble gives you an access to a huge amount of apps. It makes it possible for your bot to get linked with many apps that are offering access to data or services through their API’s.

With those API’s, you would be able to send emails, collect data you need, store your data in different documents like for example storing clients data in google sheets.

Each API has its own authentication process, some applications are providing access tokens at the end of the process to make API requests possible.

As an example, let me show you how to use a bubble API to use data from a NASA API:

First of all, go to [https://api.nasa.gov/](https://api.nasa.gov/).

Generate an API key by filling a NASA form:

 ![Capture d’écran 2021-12-21 à 18.35.26](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/aeb794f14eefa310c05e0682e832537ce6995c7b.png)

It will provide you an API key:

 ![Capture d’écran 2021-12-21 à 18.36.44](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/3537aeda3d86580b13840946f09f588e91b9ce52.png)

On the NASA site, we can find documentation about theirs API’s, let’s try the first we see, the APOD API:

 ![Capture d’écran 2021-12-21 à 18.39.35](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/abb5cabdf09656c069e36c8bf6ef758f00d8b485.png)  
We see that this API is answering to “GET” request type, and its endpoint is: [https://api.nasa.gov/planetary/apod](https://api.nasa.gov/planetary/apod)

Now, let’s create an API bubble to use it:

 ![Capture d’écran 2021-12-21 à 18.41.19](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/27f76a05ab67a1e211f47f79e011868701498348.png)

Precise that we are using a GET request, copy the endpoint in the API URL, and add “?api\_key=” and add the API key you generated before in the link.

 ![Capture d’écran 2021-12-21 à 18.44.34](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/f32af8090b1b149cee72f674685f87924f395d2b.png)  
The API answer body is in JSON format that’s why we are selecting it.

Create a new data in data manager, this data will store the response of the API just after the GET request.

 ![Capture d’écran 2021-12-21 à 19.05.58](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/e8afa7c4d16a19ea667ff9a216fc2d0c7efa43d4.png)

We know that the response is like this:

 ![Capture d’écran 2021-12-21 à 19.10.46](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/31e1b37c3f7defaa0c19f1c773da5fb6d9fb219c.png)

So the data you create has to be an object with all the informations you want to collect:

 ![Capture d’écran 2021-12-21 à 19.11.44](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/45c07d83f37f451be72b679c59ec12e0497b993f.png)

Back in your bubble, switch on “store response”, select your data and don’t forget to write the path like this:  
 ![Capture d’écran 2021-12-21 à 19.15.29](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/ccc9a28893efebabb264377df1393b2d68c5f9fc.png)

Don’t forget to link your bubble with other bubbles. ![Capture d’écran 2021-12-21 à 19.20.02](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/f6ef761fdfe094f1a50f37cfdb9efabc2c0d31b6.png)

You now made an API request with our bubble. The data you collected can be used in other bubbles, like a media one to show the photo using its URL:

 ![Capture d’écran 2021-12-21 à 19.21.29](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/833dc8a6d377c5ebf1cef0e15cd212b46cf450fe.png)

Here how it can work during a conversation:

 ![Capture d’écran 2021-12-21 à 19.25.11](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/2303306b16d34c93c84d2bf9d518daadeec62d36.png)

Now you have an example of what you can make with API bubbles.

With some API’s, it can be a difficult part to get the right token for the right request you need without developers. However, we are working to develop easy ways to link your bot with those API’s, recently, we made an integration which provides you tokens for your bot just by clicking on a link.

And it is just the beginning.

I am available if you have more questions or if you need more details.  
Regards,  
Badr Vancauwenberghe
