How do I use the API bubble?

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

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/.

Generate an API key by filling a NASA form:

It will provide you an API key:

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


We see that this API is answering to “GET” request type, and its endpoint is: https://api.nasa.gov/planetary/apod

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

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.


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.

We know that the response is like this:

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

Back in your bubble, switch on “store response”, select your data and don’t forget to write the path like this:
Capture d’écran 2021-12-21 à 19.15.29

Don’t forget to link your bubble with other bubbles. Capture d’écran 2021-12-21 à 19.20.02

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:

Here how it can work during a conversation:

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