Custom widget Help

Custom widget Help

hi 
-----------------------------------------
The Code and folder Structur
-----------------------------------------
i have build a custom widget to get data from inputfield in widget setting .

App ID : 7001

all is working and i am getting the number displayed on the widget page.

but i want to use that number for a js file to grab some api data.
If i manually input the number  in the main.js file that have everything for the api fetching then everything works
but when i am using my index.js and using the code to add the number to the api url. then it will not work
const api = "https://services.domain/screen/" + api_API_js;

looking for guidens and help