Would it be possible for you to share your way of doing this? I would be very interested in B2 access without browser.
https://github.com/ncw/rclone