Welcome to the Web API documentation 👋

🌍 Learn how to build great integrations.
The Homey Web API is a HTTP + Socket.IO API to control devices, manage Flows etc. It is used by Athom for the Homey Mobile App, Homey Web App, Alexa, Google Assistant etc.
The Web API is also used by HomeyScript and apps using the homey:manager:api permission. Learn more »
Please fill out this form to request your own Web API Client ID & Secret.

Local Development

Until you have your own Client ID & Secret, you can use these credentials to test your project locally.
Client ID
Client Secret
Callback URL
http://localhost, http://localhost/oauth2/callback
It is not allowed to use these credentials for commercial or non-development purposes.


const AthomCloudAPI = require('homey-api/lib/AthomCloudAPI');
// Create a Cloud API instance
const cloudApi = new AthomCloudAPI({
clientId: '...',
clientSecret: '...',
// Get the logged in user
const user = await cloudApi.getAuthenticatedUser();
// Get the first Homey of the logged in user
const homey = await user.getFirstHomey();
// Create a session on this Homey
const homeyApi = await homey.authenticate();
// Loop all devices
const devices = await homeyApi.devices.getDevices();
for(const device of Object.values(devices)) {
// Turn device on
await device.setCapabilityValue({ capabilityId: 'onoff', value: true });

👥 Community

Last modified 8mo ago