Generate Onboarding URL with User Context
async function getWattshiftOnboardingUrl() { const { url, homeId } = await wattshiftApiCall( "https://api.wattshift.com/v1/onboarding/url/generate", { userId: "user id", redirectUrl: "https://yourbackend.com/redirecturi", enableThirdPartyDevice: false, // set to false if you control your own devices. hvacs: [ { name: "user id thermostat", enabled: true, defaultMode: "HEAT", tempUnits: "F", maxTemp: "75", minTemp: "65", defaultTemp: "70", deviceType: "Hvac", canHeat: true, canCool: false, targetTemp: 70, currentTemp: 70, }, ], }, ); return { url, homeId }; }
https://app.wattshift.com