Enable the API in the settings of the Logitech G HUB software
Create an application and obtain a Client ID and client secret for your web application from the Logitech Developer Portal at https://developer.logitech.com
Use a library like axios to authenticate your web application with the Logitech G HUB API and obtain an authorization token
Create API calls
EXAMPLE:
To get the battery level of a wireless device use the following command:
axios.get("https://api.g-hub.io/graphql?authorization-<your_access_token>" { params: { query: { wirelessDevices { batterLevel } } } }).then(res => { console.log(res); });
EXAMPLE:
To get the battery level of a wireless device use the following command:
axios.get("https://api.g-hub.io/graphql?authorization-<your_access_token>" { params: { query: { wirelessDevices { batterLevel } } } }).then(res => { console.log(res); });