Accessing data in js through web api is a piece of cake. Use adal.js which has all the required methods for authentication, token generation.
Ok - so you have bought the smart bulb and have got bored of changing its colors from the app. You may have also used Google Home/Assistant or Alexa and said 'Ok Google! Make the Living Room Pink' - boom the color changes to Pink! Interesting to play with for another couple of days but what next? You may schedule it with the day cycle or with weather to change color and intensity of brightness but I thought why not use it to track the CRM deployment status and outcome? I already have mail notifications enabled in the custom deployment script which sends alerts when the deployment starts, succeeds or fails. So my target was to implement the highlighted: What I had: The smart bulb - bought at Amazon on discounted price The native app of bulb - Apart from the ability of changing colors, etc. and scheduling it didn't provide much so I use io.e (get the app) service to integrate it with ifttt ifttt account - you must register and explore this if you haven't.