Forum Documentation Showcase Pricing Learn more

Trigger API with button click


#1

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?

Thanks!


#2

Have you tried a workflow?


#3

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.


#4

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


#5

Was the webinar recorded? @keith


#6

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


#7

Thank you very much :grin:


#8

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


then


#9

Thank you so much! Appreciate it.