mmohades / Venmo

Venmo API client for Python
GNU General Public License v3.0
145 stars 43 forks source link

Two Factor Authentication without CLI #82

Open Harryacorn2 opened 1 year ago

Harryacorn2 commented 1 year ago

Added functionality for OTP to be provided by a callback function instead of the CLI for use in headless applications. Simply provide a callback function that returns a string as the optional "otp_func" parameter when calling "get_access_token". If two factor authentication is required, your callback function function will be run, and the string it returns will be used used as the OTP. If your function returns a string that is not valid (if it has less than 6 characters or if they're not all numbers) the function will be run repeatedly until a valid string is returned by it (similar to the functionality of the CLI).,