I really don’t see how this would be possible. Ring does not provide any type of official API so we’re forced to basically reverse engineer the existing protocol used by the Ring applications. If 2FA is enabled, as far as I can see, the only way to receive the second factor is via text message (for example, it’s not even possible to access your account if your phone is broken/dead/unreachable, without calling Ring customer support).
I suppose it might be possible to prompt for the 2FA during script startup, but that seems pretty ugly and would pose issues for things like system reboots and interruptions in internet service, etc., where authentication has to happen automatically.
In an ideal world Ring would provide a proper API for 3rd party integration, allowing people to get an API key/secret to access functions instead of using their user login, but I’ve not seen anything that would indicate they are planning to provide something like this.