How to change the value of an API variable through the app

Hello, I am using an API link which end with a [barcode] variable as shown here :

https://world.openfoodfacts.org/api/v2/product/[barcode]

Then, i created a variable under the API settings, as shown here :

(on the screen the variable shows as an integer, but i switched it to String to match the variable type of the widget explained below)

I would like to know how i can send the result of a Scan Code Widget into this API variable, so that the product barcode scanned through the widget could make its way inside this API variable, replacing the default value.

How can i achieve that ?

1
1 reply