API Reference

Use the read method to retrieve information about the storage capacity of authenticated user.

  try {
    const [data, error] = await sdk.storage.read();

    // Log storage capacity
    console.log("Storage Capacity:", data.storage.capacity, "bytes");
  } catch (error) {
    console.error("Failed to retrieve storage information:", error.message);
  }

Required API Key Permission

  • Read Directory