Integrate an SDK
Move to an SDK after the curl or Bruno verification succeeds. Keep API Client credentials in your backend and reuse the verified authentication and device-query flow.
Available SDKs
The SDKs are currently distributed as source code in the WLTE OpenAPI SDK repository.
| Language | Directory |
|---|---|
| TypeScript | sdk/typescript |
| Python | sdk/python |
| Go | sdk/go |
bash
git clone https://github.com/svnwi/wlte-openapi-sdk.gitCurrent coverage includes authentication, device queries, device type definitions, relay control, RS485, device configuration, and command-result lookup.
TypeScript
bash
cd wlte-openapi-sdk/sdk/typescript
cp .env.example .env
npm install
npm run example:list-devices
npm run example:list-profilesPython
bash
cd wlte-openapi-sdk
cp sdk/python/.env.example sdk/python/.env
python3 sdk/python/examples/list_devices.py
python3 sdk/python/examples/list_profiles.pyGo
bash
cd wlte-openapi-sdk/sdk/go
cp .env.example .env
go run ./examples/list_devices
go run ./examples/list_profilesProduction Checklist
- Load
clientIdandclientSecretfrom server-side secret storage. - Cache access tokens until shortly before
expiresIn. - Handle the HTTP status and response
code; do not branch onmessage. - Respect
Retry-Afterand use bounded retries. - Record
requestIdfor troubleshooting without logging credentials or tokens. - Use REST for baseline synchronization and WebSocket for continuous events when required.
