Comprehensive studies of gas-solid reactions require the in-situ interaction of the gas at a pressure beyond the operating pressure of ultrahigh vacuum (UHV) X-ray photoelectron spectroscopy (XPS). The recent progress of near ambient pressure XPS allows to dose gases to the sample up to a pressure of 20 mbar. The present work describes an alternative to this experimental challenge, with a focus on H2 as the interacting gas. Instead of exposing the sample under investigation to gaseous hydrogen, the sample is in contact with a hydrogen permeation membrane, through which hydrogen is transported from the outside to the sample as atomic hydrogen. Thereby, we can reach local hydrogen concentrations at the sample inside an UHV chamber, which is equipped with surface science tools, and this corresponds to a hydrogen pressure up to 1 bar without affecting the sensitivity or energy resolution of the spectrometer. This experimental approach is validated by two examples, that is, the reduction of a catalyst precursor for CO2 hydrogenation and the hydrogenation of a water reduction catalyst for photocatalytic H2 production, but it opens the possibility of the new in situ characterisation of energy materials and catalysts.