Skip to content

Entering OTP code in a GUI #41

Answered by mmohades
tdunnigan asked this question in Q&A
Discussion options

You must be logged in to vote

As of now, you'd have to do the authentication manually for that. However, it will become more flexible if #35 gets completed or I'll add it later so that you can pass a function that is expected to return the OTP to the Client.get_access_token() function. In that case, you could make that passed function to read the input however you'd like.

Here is a manual authentication template for you:

def manually_login(username: str, password: str, device_id: str = None):

    # You can use trusted device-id stored from before, pass it to AuthenticationApi(device_id="some id")
    auth = AuthenticationApi(device_id=device_id)
    response = auth.authenticate_using_username_password(username, password

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tdunnigan
Comment options

Answer selected by mmohades
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants