Controlling spin currents, that is, the flow of spin angular momentum, in small magnetic devices, is the principal objective of spin electronics, a main contender for future energy-efficient information technologies1,2. A pure spin current has never been measured directly because the associated electric stray fields and/or shifts in the non-equilibrium spin-dependent distribution functions are too small for conventional experimental detection methods optimized for charge transport3,4. Here we report that resonant inelastic X-ray scattering (RIXS) can bridge this gap by measuring the spin current carried by magnons—the quanta of the spin wave excitations of the magnetic order—in the presence of temperature gradients across a magnetic insulator. This is possible due to the sensitivity of the momentum- and energy-resolved RIXS intensity to minute changes in the magnon distribution under non-equilibrium conditions. We use the Boltzmann equation in the relaxation time approximation to extract transport parameters, such as the magnon lifetime at finite momentum, essential for the realization of magnon spintronics.