API
Access the Ubidots JavaScript SDK from HTML Canvas
JavaScript SDK
ubidots.api.<JS_SDK_METHODS>Usage
// Get the token from the Ubidots built-in library
const TOKEN = ubidots.token;
// Authenticate the SDK with the token
ubidots.api.authenticate(TOKEN);
// Get the first 100 devices in the account
ubidots.api.devices.get().then((devices) => {
// Print an array of Device objects
console.log(devices);
// YOUR LOGIC FOR THESE 100 DEVICES
});Last updated
Was this helpful?