Official SDKs
Choose your preferred language
Python
onwords
Official Python SDK for controlling Onwords smart devices. Perfect for automation scripts.
Install
pip install onwords- Gate control
- 3CH Relay control
- Simple API
Node.js
onwords
Official Node.js SDK with CLI support. Use in your apps or control devices from terminal.
Install
npm install onwords- Gate control
- CLI included
- Promise-based
REST
REST API
Direct REST API access for any language. Full control over HTTP requests.
Install
curl -X POST https://ostapi.onwords.in/control-device/- Language agnostic
- JSON responses
- x-api-key auth
Quick Start
Get up and running in minutes
PyPython
from onwords import Onwords
client = Onwords("your_api_key")
# Control gate
client.gate.open("product_id")
client.gate.close("product_id")JSNode.js
const onwords = require('onwords');
onwords.configure('your_api_key');
// Control gate
const gate = onwords.control('product_id');
await gate.open();
await gate.close();CLITerminal
# Configure API key
onwords-config -k YOUR_API_KEY
# List your products
onwords-list
# Control gate
onwords-control product_id open