Step 1. Install SwitchBot App and sign up SwitchBot account.
(If you are a SwitchBot user already, please skip this step.)
Launch the App and tap "Sign in"on the left side menu.
Step 2. Turn on your phone's Bluetooth service and allow the SwitchBot app to access your location*. Tap "+" in the App, choose "Contact Sensor".
Step 3. Press and hold the button of the Contact Sensor until the indicator flashes and then tap "next."
For your ref:
Why SwitchBot app needs location permission?