Forum Documentation Showcase Pricing Learn more

Trigger API with button click


I want to “refresh” an API call on a button click, to get a different value from the API. Taking the “Using external APIs” Lesson as an example. In that lesson, the API will show the iTunes search results when the text in the input is changed. Instead, I want it to only show search results when a button is clicked. How would I do this?



Have you tried a workflow?


Yep. Same as you’d do anything else triggered on a button click.

Make a button. Set up its properties.

In the properties window for the button, you’ll bee a button “start/edit workflow”. Click it. Build a workflow that happens on click.


BTW, for more on using APIs, @joshua.hovden, you might be interested in the very recent Bubble webinar on the API Connector. The first part covers some basic API Connector setup and use of external APIs in a project.

The second part covers oAuth authentication and login (enabling a new login method for your users based on authenticating to another service — in this example case, LinkedIn).

Along the way, you’ll see @neerja do a bunch of typical Bubble stuff. Just seeing THAT might be helpful to you in getting going with some of the Bubble basics.

LINK: Todays api webinar


Was the webinar recorded? @keith


Derp! Just edited the link back into my reply. Duh.


Thank you very much :grin:


In the workflow, you can call the data from the API



Thank you so much! Appreciate it.