[Python] robin_stocks Robinhood Authentication Stopped Working

Discussão em 'Python' iniciado por Stack, Dezembro 18, 2024.

  1. Stack

    Stack Membro Participativo

    Robinhood Authentication through MFA as described here https://robin-stocks.readthedocs.io...ically-from-time-based-one-time-password-totp was working until Dec 17. I have tried multiple times but unsuccessful. Is anyone experiencing a similar issue?

    The error message is not very helpful.

    Traceback (most recent call last):
    File "rhs.py", line 962, in f2
    rbh_ = rbh.authentication.login (username="....", password="....", mfa_code=totp)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/mycomputer/anaconda3/lib/python3.12/site-packages/robin_stocks/robinhood/authentication.py", line 198, in login
    raise Exception(data['detail'])
    ~~~~^^^^^^^^^^
    KeyError: 'detail'


    I tried to print what data contains and obtained the following. (Note: data = request_post(url, payload) within the robin_stocks/robinhood/authentication.py).

    {'verification_workflow': {'id': '***5d74a-****-****-9721-cb00a6d69***', 'workflow_status': 'workflow_status_internal_pending'}}

    Could it be that the 'client_id': 'c82SH0WZOsabOXGP2sxqcj34FxkvfnWRZBKlBjFS', used in the payload used for authentication (within the robin_stocks/robinhood/authentication.py file) is no longer allowed by robinhood?

    url = login_url()
    payload = {
    'client_id': 'c82SH0WZOsabOXGP2sxqcj34FxkvfnWRZBKlBjFS',
    'expires_in': expiresIn,
    'grant_type': 'password',
    'password': password,
    'scope': scope,
    'username': username,
    'challenge_type': challenge_type,
    'device_token': device_token
    }


    Any help will be greatly appreciated. Thank you.

    Continue reading...

Compartilhe esta Página