A Node.js wrapper for the Google Wi-Fi API
npm i google-wifi-api-node
See this documentation for in-depth information about the API in use.
This library requires a refresh token, which can be obtained here: https://www.angelod.com/onhubauthtool/
const GoogleWifiApi = require('./index');
const googleWifiApi = new GoogleWifiApi('YOUR REFRESH TOKEN HERE');
(async () => {
await googleWifiApi.init();
const groups = await googleWifiApi.getGroups();
const devices = await googleWifiApi.getGroupDevices(groups.groups[0].id)
console.log(devices);
})();