zbjdonald / synology-drive-api

Synology drive api python wrapper.
MIT License
61 stars 15 forks source link

Add OTP support #10

Closed hendrikbl closed 1 year ago

hendrikbl commented 1 year ago

I have OTP enabled for my NAS wich leads to an Execption of type otp when attempting to create a SynologyDrive instance.

Are you planning on supporting OTP?

zbjdonald commented 1 year ago

em... DSM7 or DSM6?

hendrikbl commented 1 year ago

DSM 7

axelperschmann commented 1 year ago

facing the same issue. Any plans to support OTP soon?

zbjdonald commented 1 year ago

I got a dsm7 synology. I will try this weekend.

zbjdonald commented 1 year ago

@axelperschmann @hendrikbl Try 1.0.11

axelperschmann commented 1 year ago

Works now with 1.0.11, many thanks!

Only downside is, one has to provide the otp code with every single query (i.e. a new one every ~30 seconds). Is there a possibility to enter it once at the start of the session and then neglect it?

zbjdonald commented 1 year ago
synd = SynologyDrive(NAS_USER, NAS_PASS, otp_code='XXXXXX')
synd.login()
synd.action1
synd.action2
synd.action3
synd.logout()
hendrikbl commented 1 year ago

Works like a charm 👍 thank you!