Developing a theory of high-temperature superconductivity in copper oxides is one of the outstanding problems in physics. It is a challenge that has defeated theoretical physicists for more than twenty years. Attempts to understand this problem are hindered by the subtle interplay among a few mechanisms and the presence of several nearly degenerate and competing phases in these systems. Here we present some crucial experiments that place essential constraints on the pairing mechanism of high-temperature superconductivity. The observed unconventional oxygenisotope effects in cuprates have clearly shown strong electron-phonon interactions and the existence of polarons and/or bipolarons. Angle-resolved photoemission and tunneling spectra have provided direct evidence for strong coupling to multiple-phonon modes. In contrast, these spectra do not show strong coupling features expected for magnetic resonance modes. Angle-resolved photoemission spectra and the oxygen-isotope effect on the antiferromagnetic exchange energy J in undoped parent compounds consistently show that the polaron binding energy is about 2 eV, which is over one order of magnitude larger than J = 0.14 eV. The normal-state spin-susceptibility data of holedoped cuprates indicate that intersite bipolarons are the dominant charge carriers in the underdoped region while the component of Fermi-liquid-like polarons is dominant in the overdoped region. All the experiments to test the gap or order-parameter symmetry consistently demonstrate that the intrinsic gap (pairing) symmetry for the Fermi-liquid-like component is anisotropic s-wave and the order-parameter symmetry of the Bose-Einstein condensation of bipolarons is d-wave.