darrent/nanoleaf-aurora-api

Access Token

Closed this issue · 3 comments

Hi!
How to get the access token? I am using iOS.
I did several man in the middle attacks. But the Nanoleaf App does not seem to connect to the web service. I think it just uses the homekit integration.
Any hint would be greatly appreciated.

Thanks
Jens

Hi Jens,

I'm using the following:

'use strict';

const request = require('request');
const nanoleafHost = 'IPHERE:PORTHERE';

let requestTokenOptions = {
    method: 'POST',
    url: 'http://' + nanoleafHost + '/api/beta/new',
};

console.log('Holding the on-off button down for 5-7 seconds until the LED starts flashing in a pattern ');

request(requestTokenOptions, function(error, response, body) {
    if (error) {
      console.log('Error: ' + error);
      return;
    }

    console.log(response.body);
});

I haven't included it in the client. I will try and add it soon.

Thanks! That should help ;)

Thanks ! here is the source: http://forum.nanoleaf.me/docs/openapi#_6ipbecxi1ifq

Code Updated below

'use strict';

const request = require('request');
const nanoleafHost = 'IPHERE:PORTHERE';

let requestTokenOptions = {
    method: 'POST',
    url: 'http://' + nanoleafHost + '/api/v1/new',
};

console.log('Holding the on-off button down for 5-7 seconds until the LED starts flashing in a pattern ');

request(requestTokenOptions, function(error, response, body) {
    if (error) {
      console.log('Error: ' + error);
      return;
    }

    console.log(response.body);
});