Open AdrianGarside opened 2 hours ago
@t0nyz0 cloudflare is now blocking the new code. I have to go to work now and couldn't find a quick workaround to meet cloudflare expections. I also noticed that the user sign in form you were using in your test app (https://bambulab.com/api/sign-in/form) appears to now be returning a captcha: Enable JavaScript and cookies to continue While https://api.bambulab.com/v1/user-service/user/login hits the cloudflare block.
Looking at the new code, it seems that for non-China login attempts the first connection attempt with password is pointless - it is now always going to be told to use the one-time verification code (auto-sent). Instead we could just go directly to requesting that code. However with the prior test app that @t0nyz0 created the login attempt with code is also being cloudflared.
Describe the bug
2024-11-06 08:05:41.997 ERROR (SyncWorker_40) [custom_components.bambu_lab.pybambu] Login attempt failed with error code: 403 2024-11-06 08:05:41.997 DEBUG (SyncWorker_40) [custom_components.bambu_lab.pybambu] Response: <!DOCTYPE html>