versi-api

Versi API

API V2 (Dengan Secret)

try {
  const result = await nexaUi
    .Network({
      type: "v2",
      credensial: "KUNCI-API-ANDA",
      secret: "KUNCI-RAHASIA-ANDA",
    }).post("users", {
      name: "Budi",
      email: "budi@contoh.com",
    });
  console.log(result);
} catch (error) {
  console.error("Detail error:", error);
}

API V1 (Tanpa Secret)

try {
  const result = await nexaUi
    .Network({
      type: "v1",
      credensial: "KUNCI-API-ANDA",
    }).post("data", {
      name: "Budi",
      email: "budi@contoh.com",
    });
  console.log(result);
} catch (error) {
  console.error("Detail error:", error);
}