This is a known issue. Just after I published the test version, Switchbot removed the API interface for security reasons. There are a lot of unhappy users Smart lock not working anymore · Issue #121 · OpenWonderLabs/SwitchBotAPI · GitHub
Hopefully they will provide a new method soon.