Need help!! Can't get login working. Struggling for 2 days :(
Hi friends, I had this working a few months back and not its all broken.. can someone pleaaaaaaaaaaaaaase help me just to get past the login trouble?
even I am facing similar issue after the token is expired since today. ERROR: There was an issue loading pickle file. Authentication may be expired - logging in normally. Traceback (most recent call last):
raise Exception(data['detail'])
KeyError: 'detail'
I really hope someone jumps in and shows how to fix.
#537 could help
I am working on this
I was working on rewriting the library in go, there is a different authentication verification workflow I did this and then changed the _validate_sherrif to _validate_sherrif_id1 and device authentication now works for me.
def _validate_sherrif_id1(device_token: str, workflow_id: str):
url = "https://api.robinhood.com/pathfinder/user_machine/"
payload = {
"device_id": device_token,
"flow": "suv",
"input": {"workflow_id": workflow_id}
}
data = request_post(url, payload, json=True)
if "id" not in data:
raise Exception("ID not returned in verification workflow")
inquiries_url = f"https://api.robinhood.com/pathfinder/inquiries/{data['id']}/user_view/"
res = request_get(inquiries_url)
challenge_id = res["type_context"]["context"]["sheriff_challenge"]["id"]
status_url = f"https://api.robinhood.com/push/{challenge_id}/get_prompts_status/"
count = 0
while count < 3:
print(f"Checking challenge status, attempt {count+1}...")
status_data = request_get(status_url)
challenge_status = status_data.get("challenge_status", "unknown")
print(f"Current Challenge Status: {challenge_status}")
if challenge_status == "validated":
print("Sheriff ID validation successful.")
inquiries_payload = {"sequence": 0, "user_input": {"status": "continue"}}
final_data = request_post(inquiries_url, inquiries_payload, json=True)
if final_data.get("type_context", {}).get("result") == "workflow_status_approved":
print("Final workflow approval successful.")
return
else:
raise Exception("Workflow approval failed.")
if challenge_status == "issued":
print("Challenge is still pending, retrying in 15 seconds...")
time.sleep(15)
count += 1
else:
break
raise Exception("Sheriff challenge failed after maximum retries.")
does anyone know which version is stable from login perspective? this was working before i am not sure what has changed