  Transiting exoplanets orbiting active stars frequently occult starspots and
faculae on the visible stellar disc. Such occultations are often rejected from
spectrophotometric transits, as it is assumed they do not contain relevant
information for the study of exoplanet atmopsheres. However, they can provide
useful constraints to retrieve the temperature of active features and their
effect on transmission spectra. We analyse the capabilities of the James Webb
Space Telescope in the determination of the spectra of occulted starspots,
despite its lack of optical wavelength instruments on board. Focusing on K and
M spectral types, we simulate starspots with different temperatures and in
different locations of the stellar disc, and find that starspot temperatures
can be determined to within a few hundred kelvins using NIRSpec/Prism and the
proposed NIRCam/F150W2$+$F322W2's broad wavelength capabilities. Our results
are particularly promising in the case of K and M dwarfs of mag$_K \leq 12.5$
with large temperature contrasts.
