Open ravi-bharadwaj opened 2 years ago
Duration of lock was 12 hours on my IP.
Use a VPN if you need to keep making requests
You can update and fix authentication.py
import requests
import pprint
def al_token():
al_pk = ""
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36',
'Referer': 'https://robinhood.com/login',
'Origin': 'https://robinhood.com/',
'Content-Type': 'application/x-www-form-urlencoded',
}
data = 'bda=e30=&public_key='+al_pk+'&site=https://robinhood.com/login&userbrowser=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36&simulate_rate_limit=0&simulated=0&language=en&rnd=0.21477650373695933'
response = requests.post('https://robinhood-api.arkoselabs.com/fc/gt2/public_key/', headers=headers, data=data)
for key, value in response.json().items():
if key == 'token':
token = value.split('|')[0]
return token
json_data = {
'device_token': '',
'al_pk': ',
'password': ',
'username': '',
'scope': 'internal',
'client_id': 'c82SH0WZOsabOXGP2sxqcj34FxkvfnWRZBKlBjFS',
'skip_prompt': True,
'grant_type': 'password',
'al_token': 'e30='+str(al_token()),
}
response = requests.post('https://api.robinhood.com/oauth2/token/', headers=headers, json=json_data)
return response
{'mfa_required': True, 'mfa_type': 'app'}
once you get the response, just pass it on to line.
- Duration of lock was 12 hours on my IP.
- Use a VPN if you need to keep making requests
- https://www.arkoselabs.com
You can update and fix authentication.py
import requests import pprint def al_token(): al_pk = "" headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36', 'Referer': 'https://robinhood.com/login', 'Origin': 'https://robinhood.com/', 'Content-Type': 'application/x-www-form-urlencoded', } data = 'bda=e30=&public_key='+al_pk+'&site=https://robinhood.com/login&userbrowser=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36&simulate_rate_limit=0&simulated=0&language=en&rnd=0.21477650373695933' response = requests.post('https://robinhood-api.arkoselabs.com/fc/gt2/public_key/', headers=headers, data=data) for key, value in response.json().items(): if key == 'token': token = value.split('|')[0] return token json_data = { 'device_token': '', 'al_pk': ', 'password': ', 'username': '', 'scope': 'internal', 'client_id': 'c82SH0WZOsabOXGP2sxqcj34FxkvfnWRZBKlBjFS', 'skip_prompt': True, 'grant_type': 'password', 'al_token': 'e30='+str(al_token()), } response = requests.post('https://api.robinhood.com/oauth2/token/', headers=headers, json=json_data) return response
{'mfa_required': True, 'mfa_type': 'app'}
once you get the response, just pass it on to line.
For some reason its almost 2 weeks now since the issue started and its still not resolved yet.
I tried to use your fix, but its an error saying invalid-grant. Have been using vpn but its slow.
Its more than a week now since I am able to login via api.
I get the following error
"Your login couldn't be completed at this time - we've received too many login attempts from your network. Switching to a different internet connection may help you log in to your Robinhood account."
Any idea on how long does api.robinhood.com hold a block for?
I can login to robinhood without any issues but not via the API from same computer.