Back

Version 5

12/31/2024
export class MullerIntuiv {
static async login(username: string, password: string): Promise<string> {
const myHeaders = new Headers();
myHeaders.append("User-Agent", "intuitiv/2.3.0 (com.myintuitiv.app; build:86; iOS 18.1.1) Alamofire/5.8.0");
myHeaders.append("Content-Type", "application/x-www-form-urlencoded");

const urlencoded = new URLSearchParams();
urlencoded.append("grant_type", "password");
urlencoded.append("client_id", "59e604638fe283fd4dc7e353");
urlencoded.append("client_secret", "ZW2vL8czEkn87zemtR1h1ZB0ZVwoeR");
urlencoded.append("username", username);
urlencoded.append("password", password);
urlencoded.append("scope", "muller_scopes");
urlencoded.append("user_prefix", "muller");

const requestOptions: RequestInit = {
method: "POST",
headers: myHeaders,
body: urlencoded,
redirect: "follow",
};

return fetch("https://app.muller-intuitiv.net/oauth2/token", requestOptions)
.then((response) => response.json())
.then((result) => result.access_token);
}

static async switchSchedule(home_id: string, schedule_id: string) {
}
}
Updated: December 31, 2024