  The origin and nature of the ultrahigh energy cosmic rays (UHECRs) are still
unknown. However, great progress has been achieved in past years due to the
observations performed by the Pierre Auger Observatory and Telescope Array.
Above $10^{18}$ eV the observed energy spectrum presents two features: a
hardening of the slope at about $10^{18.7}$ eV, which is known as the ankle and
a suppression at approximately $10^{19.6}$ eV. The composition inferred from
the experimental data, interpreted by using the current high energy hadronic
interaction models, seems to be light below the ankle, showing a trend to
heavier nuclei for increasing values of the primary energy. Current high energy
hadronic interaction models, updated by using Large Hadron Collider data, are
still subject to large systematic uncertainties, which makes difficult the
interpretation of the experimental data in terms of composition. On the other
hand, it is very well known that gamma rays and neutrinos are produced by
UHECRs during propagation from their sources, as a consequence of their
interactions with the radiation field present in the universe. The flux at
Earth of these secondary particles depends on the source models of UHECRs
including the chemical composition at injection. Therefore, both gamma-ray and
neutrino observations can be used to constrain source models of UHECRs,
including the composition in a way which is independent of the high energy
hadronic interaction models. In this article I will review recent results
obtained by using the latest gamma-ray and neutrino observations.
