I’m trying to write a Javascript app that will control my LIFX light bulb, and am having an issue setting it up. I can’t get this basic code to work which I copied from the api docs (it works in the api docs):
const sdk = require('api')('https://api.developer.lifx.com/openapi/63053fd59807941f67a92dcb');
sdk.auth('Bearer myaccesstoken');
sdk.listScenes()
.then(({ data }) => console.log(data))
.catch(err => console.error(err));
I replaced my access token with ‘myaccesstoken’ above. The error I get when running this javascript is this:
'SyntaxError: Validation failed. /paths/scenes/scene_id::scene_uuid/activate/put has a path parameter named "scene_uuid", but there is no corresponding {scene_uuid} in the path string\n'
I’ve tried various ways to set the parameter scene_uuid with no success, but I wouldn’t have thought I’d need to specify a scene_uuid when what I’m trying to do is list my accounts scenes.
Any help would be much appreciated.