Owing to the flexible light control and the immunity to defects and impurities, topological photonic crystals (TPC) are considered an excellent platform in the engineering of optoelectronic devices. Herein, four TPC refractive index (RI) sensors are theoretically proposed based on the su-Schrieffer-Heeger (SSH) model. Zero-dimensional topological corner states (TCS) and 1-D topological edge states (TES) are demonstrated by the band structure and the Zak phases. Four TPC sensors are based on single topological microcavity (TCS formed by two TES ...