Skip to main content

Quickstart

Introduction

This guide will walk you through the process of generating a link that allows your customers to connect their devices with Texture.

There are three ways to generate a link:

  1. The Texture API
  2. The Texture SDK (Javascript, React, or React Native)
  3. The Texture Dashboard

Texture API and SDK

Get Your API Key

Go to the Texture Dashboard Developer tab to obtain an API key

Node v18 + required

#!/usr/bin/env node

const textureApiUrl = "https://api.texturehq.com";
const apiKey = process.env.TEXTURE_API_KEY || "<your-api-key-goes-here>";

console.log(`Using API key: ${apiKey}`);

// Node v18 has fetch built in
fetch("https://api.texturehq.com/v1/connections", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Texture-Api-Key": apiKey,
},
body: JSON.stringify({
referenceId: "9bb290c8-fe97-46ce-92a8-952823164277",
redirectUrl: "http://localhost:8000",
tags: ["tag1", "tag2"],
clientName: "Energy Demo"
customerInfo: {
email: "example@example.com",
phone: "555-555-0100",
firstName: "John",
lastName: "Doe",
},
}),
})
.then((response) => {
if (response.ok) {
return response.json();
}
throw new Error(
`Failed to make request: ${response.status}, ${response.statusText}`
);
})
.then((responseJSON) => {
console.log(responseJSON);
})
.catch((error) => {
console.error("Failed to make request", error);
});

Texture Dashboard

  1. Go to the Texture Dashboard.
  2. Enter the user's information.
  3. Click submit.

Dashboard Link

Customer Device Connect Flow

Once the user follows the link or is prompted to set up their device, they will be guided through the Texture Connect flow. This process is designed to be user-friendly and intuitive. Here's what the user can expect:

  1. Welcome Screen: The user is greeted with a welcome screen that introduces the connection process.

    Welcome Screen

  2. User Information: The user enters their name, contact, and address information.

    User Information User Address

  3. Device Set Up: The user selects their device manufacturer, signs into their account, and selects devices to connect.

    Device Manufacturer Selection Sign In to Device Account Enter Device Account Credentials Select Devices

  4. Success: The user's device is set up! When they click continue they will be sent to the redirectUrl you provided.

    Success

Viewing Customer Device Information

Go the the Texture Dashboard.

Customers

Click "Customers" to see customers that have connected a device.

Customers

Sites

Click "Sites" to see customer device locations.

Sites

Devices

Click "Devices" to see connected customer devices.

Devices

Click on the device "Serial Number" to see detailed information about the device.

Device Details