"As a toxic mechanism, cry proteins bind to specific receptors on the membranes of mid-gut (epithelial) cells of the targeted pests, resulting in their rupture. Other organisms (including humans, other animals and non-targeted insects) that lack the appropriate receptors in their gut cannot be affected by the cry protein, and therefore are not affected by Bt."
https://en.wikipedia.org/wiki/Bacillus_thuringiensis
Edit: "Spores and crystalline insecticidal proteins produced by B. thuringiensis have been used to control insect pests since the 1920s and are often applied as liquid sprays and donut pellets."