Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

challenge_response["status"] : {'detail': 'Authentication credentials were not provided.'} #523

Open
helhadry opened this issue Dec 18, 2024 · 17 comments

Comments

@helhadry
Copy link

Hello,

I'm using the fix from this PR for robin authentication :
#510

It was working fine but now I don't receive the SMS code and It's failing at this point:
`challenge_response = request_post(url=challenge_url, payload=challenge_payload, json=True)

  if challenge_response["status"] == "validated":
      inquiries_payload = {"sequence": 0, "user_input": {"status": "continue"}}`

here is what I see in the challenge_response (there is no status in the dictionary):
{'detail': 'Authentication credentials were not provided.'}

Thanks for your help.

@Two20Two21
Copy link

Me too.

@No-Reality-Shows
Copy link

me three

@Two20Two21
Copy link

I used the code below with the latest robin-stocks release (3.2.1) plus the authentication.py module from two weeks ago with the sheriff module and it no longer works for me. It doesn't prompt me for the MFA code, it just errors out.

MY CODE

import robin_stocks.robinhood
import pyotp
from datetime import *

now = datetime.now()
totp = pyotp.TOTP("KACUJH6EKZZCVZ6K").now()
print("TOTP: " + str(totp))
login = robin_stocks.robinhood.login(my_user_name, my_password, store_session=True)

@Two20Two21
Copy link

Bonehead move on my part. Got the MFA code from the authenticator app. Didn't enter the six digit code. I'm running. Thanks for your help.

@regholl2023
Copy link

it says i get the TOTP FROM MY ROBINHOOD ACCOUNT SETTINGS BUT I CAN'T FIND IT

@Two20Two21
Copy link

Two20Two21 commented Dec 22, 2024

Account -> Settings -> Security and Privacy -> Two-Factor Authentication -> Authenticator App

If you look at my code I have above, it will print the ToTP code to the console. You can then input that into the authenticator app. Here's a tutorial if that helps. https://www.youtube.com/watch?v=C5buU4zjjx0

@regholl2023
Copy link

I followed the video and this was the output, ERROR: There was an issue loading pickle file. Authentication may be expired - logging in normally.
Traceback (most recent call last):
File "E:\ROBINHOOD\robin.py", line 7, in
login = rh.login('[email protected]','001Primo$$')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ROBINHOOD\venv\Lib\site-packages\robin_stocks\robinhood\authentication.py", line 190, in login
_validate_sherrif_id(device_token=device_token, workflow_id=workflow_id, mfa_code=mfa_code)
File "E:\ROBINHOOD\venv\Lib\site-packages\robin_stocks\robinhood\authentication.py", line 230, in _validate_sherrif_id
if challenge_response["status"] == "validated":
~~~~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'status'

@Two20Two21
Copy link

Two20Two21 commented Dec 22, 2024

Have you looked at this? #510 also #513

Bottom line is you need to drop the updated authentication.py file into: AppData\Local\Programs\Python\Python312\Lib\site-packages\robin_stocks\robinhood

@regholl2023
Copy link

nope,I followed the vid exactly but i shall have a look now ty.

@nat2k5us
Copy link

nope,I followed the vid exactly but i shall have a look now ty.

You should delete the passed you posted and also change it

@Two20Two21
Copy link

What?

@nat2k5us
Copy link

nat2k5us commented Dec 23, 2024

File "E:\ROBINHOOD\robin.py", line 7, in
removed the PII info

@regholl2023
Copy link

regholl2023 commented Dec 23, 2024

ty,i was so frustrated didn't even think about that.i am making progress i just have to figure the validate sheriff code

@regholl2023
Copy link

regholl2023 commented Dec 23, 2024

i'm getting error in authentication.py,"data" is not defined in the def _get_sherrif_challenge

@nat2k5us
Copy link

i'm getting error in authentication.py,"data" is not defined in the def _get_sherrif_challenge
have you tried?
#524 (comment)

@regholl2023
Copy link

fixed that now im on "validate_sheriff_url" is not defined error in authentication.py

@hokeihero
Copy link

I have the same issue [{'detail': 'Authentication credentials were not provided.'}] and the Robinhood app have prompt ask me if I am logging in. Even I clicked yes, the process is still failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants