Observed hard X-ray spectra of intermediate polars are determined mainly by the accretion flow velocity at the white dwarf surface, which is normally close to the free-fall velocity. This allows us to estimate the white dwarf masses as the white dwarf mass-radius relation M − R and the expected free-fall velocities at the surface are well known. This method is widely used. However, derived white dwarf masses M can be systematically underestimated because the accretion flow is stopped at, and re-accelerates from, the magnetospheric boundary R m and, therefore, its velocity at the surface is lower than free fall. To avoid this problem, we computed a two-parameter set of model hard X-ray spectra, which allows us to constrain a degenerate M − R m dependence. Previous works showed that power spectra of accreting X-ray pulsars and intermediate polars exhibit breaks at frequencies corresponding to Keplerian frequencies at the magnetospheric boundary. Therefore, the break frequency ν b in an intermediate polar power spectrum gives another relation in the M − R m plane. The intersection of the two dependences allows us, therefore, to determine the white dwarf mass and magnetospheric radius simultaneously. To verify the method, we analysed the archival Suzaku observation of EX Hya, obtaining M/M = 0.73 ± 0.06 and R m /R = 2.6 ± 0.4, which is consistent with the values determined by other authors. Subsequently, we applied the same method to a recent NuSTAR observation of another intermediate polar GK Per performed during an outburst and found M/M = 0.86 ± 0.02 and R m /R = 2.8 ± 0.2. The long duration observations of GK Per in quiescence performed by Swift/BAT and INTEGRAL observatories indicate increase of magnetosphere radius R m at lower accretion rates.