JavaScript/TypeScript client for the Losant IoT platform REST API. Current stable version is 4.2.0, released as an npm package. It uses Axios under the hood and supports both browser and Node.js environments (v20+). Key differentiators: provides full coverage of the Losant API, supports device and user authentication, returns promises only, and is maintained by Losant itself. The library is minimal with a single `createClient` export and extensive API reference documentation.
npm install losant-restNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Authenticates as a device, sets the access token, and sends device state to the Losant platform.
Use `await` or `.then()` instead of a callback.
Upgrade Node.js to v20 or later.
Use `import api from 'losant-rest'` instead.
Always import the default export: `import api from 'losant-rest'`.
Use `import type { ClientOptions } from 'losant-rest'`.Use `import api from 'losant-rest'` and then `api.createClient()`.
Run `npm install losant-rest` and ensure Node.js v20+.
Upgrade to losant-rest@3.0.0 or later and use promises.