Superconductivity is caused by the interaction between electrons by the exchange of collective bosonic excitations, however, this bosonic glue forming electron pairs is manifested itself by the coupling strength of the electrons to collective bosonic excitations. Here the doping and momentum dependence of the coupling strength of the electrons to spin excitations in cuprate superconductors is studied within the framework of the kinetic-energy-driven superconducting mechanism. The normal self-energy in the particle-hole channel and pairing self-energy in the particle-pariticle channel generated by the interaction between electrons by the exchange of spin excitation are employed to extract the coupling strengths of the electrons to spin excitations in the particle-hole and particle-particle channels, respectively. It is shown that below the superconducting transition temperature, both the coupling strengths in the particle-hole and particle-particle channels around the antinodes consist of two peaks, with a sharp low-energy peak located at around 5 meV in the optimally doped regime, and a broad band with a weak peak centered at around 40 meV. In particular, this two-peak structure in the coupling strength in the particle-hole channel can persist into the normal-state, while as a consequence of the d-wave type symmetry of the superconducting gap, the coupling strength in the particle-particle channel vanishes at the nodes. However, the positions of the peaks in the coupling strengths in the underdoped regime shift towards to higher energies with the increase of doping. More specifically, although the positions of the peaks in the coupling strengths move to lower energies from the antinode to the hot spot on the electron Fermi surface, the weights of the peaks decrease smoothly with the move of the momentum from the antinode to the hot spot, and fade away at the hot spots.