This has been confirmed through accurate measurements made by WMAP (Wilkinson Microwave Anisotropy Probe), a spacecraft that maps out the differences in temperature of the cosmic microwave background radiation (CMBR) across the entire sky. These results, which only has a 2% margin of error, were released in 2008.
Even before the WMAP measurements, a project in 2001 known as Boomerang already showed that the Universe was flat within 15% accuracy."