Providing Internet connectivity to a massive number of Internet-of-Things (IoT) objects over the unlicensed spectrum requires: 1) identifying a very large number of narrowband channels in a wideband spectrum and 2) aggressively reusing the available channels over space to accommodate the high density of IoT devices. To this end, we propose a sensing-based architecture that identifies spectral and spatial resources at a fine resolution. In particular, we first propose a sensing assignment scheduler, where each base station (BS) is assigned a subset of the spectrum to sense at a high resolution. We then propose a distributed sensing algorithm, where BSs locally process and share their sensing reports, so that each BS obtains occupancy information of the wideband spectrum at its location. Once the spatio-spectral resource blocks are identified, we further propose a distributed resource allocation algorithm that maintains high spatial reuse of spectral opportunities while limiting the intra-network and inter-network interference. Numerical simulations are presented to validate the effectiveness of the proposed distributed algorithms, comparing them to centralized and non-cooperative schemes. It is shown that our architecture identifies more spatio-spectral resources, with lower misdetection of incumbents. As a result, more IoT devices are connected with limited interference into incumbents.