tedchou12 / webull

Unofficial APIs for Webull.
MIT License
596 stars 181 forks source link

"Fail to verify image verification code." #411

Open M1NL1TE opened 1 year ago

M1NL1TE commented 1 year ago

@tedchou12

When trying to login, the image verification is failing. After going through the MFA verification I've always just used "wb.login.prompt()" with no issue. Now when I debug and check the response it is returning a Response [417] : b'{"msg":"Fail to verify image verification code.","code":"user.check.slider.pic.fail"}'

So I would normally just do: wb.logout()

wb.refresh_login() | Had to comment out the refresh login because that stopped working too and would break out of the program

wb._set_did = "did from network response" wb.login_prompt()

Any ideas why the image verification may be failing now?

rakesh433jntu commented 1 year ago

All of sudden even me to getting error, I tried many ways to fix issue. I could not able to do it.

Boys ... Any positive new ?

@tedchou12 @M1NL1TE

huaxiawang commented 1 year ago

Same issue encountered, I think Webull added an anti-robo verification on login. It's very annoying and I haven't figured out a way to bypass it.

image
rakesh433jntu commented 1 year ago

@huaxiawang it was cracked before. we do have work around to over come this issue by going to network tab and added v2/account response to code. Now we bull changed style , Work around no longer working now. Back to original situation

@M1NL1TE @tedchou12

LukeWang01 commented 1 year ago

Same issue, currently no solution...

LukeWang01 commented 1 year ago

Hi guys, I just logged in, it works.

  1. Login Webull trading via website, using your email and password. Do not login via scaning the QR code.
  2. Finish login verification.
  3. And then find the access_token in the dev mode on Chrome.
  4. Then: log_in_data = wb.login(your_email, your_password, 'your_device_name', save_token=True) wb._access_token = access_token print(wb.is_logged_in())

In my end, the print result is True.

And here you go, trading is working now.

alexh0101 commented 1 year ago

@LukeWang01 Thanks for that. Is is possible to also get the refresh token that way?

LukeWang01 commented 1 year ago

@LukeWang01 Thanks for that. Is is possible to also get the refresh token that way?

No, it doesn't work. wb.refresh_login() JSONDecodeError: Expecting value: line 1 column 1 (char 0)

But you can find the access token by your own and run wb._access_token = access_token

This will work, but I am not sure how long the access_token will be expired.

AlanTkachuk commented 12 months ago

@LukeWang01 I am looking through the HTTP requests on the Network tab and I can't find the access token. Where do you see it after logging into Webull on chrome?

Chase-Grajeda commented 12 months ago

As of now, filter for 'v2' within the Network tab. Click on the result and you'll find your Access_token under Request Headers

ICANTFINDAUSERNAMEATALL commented 7 months ago

https://github.com/tedchou12/webull/wiki/Workaround-for-Login-%E2%80%90-Method-2

You just need to verify it on your own browser, inspect and get the did(device id) of your browser, and then manually set that as the did in the webull object before you use the login. This way, webull will think that you are logging in from the verified browser. Look around in Method 1/2 if you need help getting the did. You can ignore everything else(I think).

worthapenny commented 2 months ago

Hi guys, I just logged in, it works.

  1. Login Webull trading via website, using your email and password. Do not login via scaning the QR code.
  2. Finish login verification.
  3. And then find the access_token in the dev mode on Chrome.
  4. Then: log_in_data = wb.login(your_email, your_password, 'your_device_name', save_token=True) wb._access_token = access_token print(wb.is_logged_in())

In my end, the print result is True.

And here you go, trading is working now.

Well, I got True as well on wb.is_logged_in() but

>>> wb.get_positions()
[]
>>> wb.get_portfolio()
{'totalMarketValue': '0.00', 'cashBalance': '0.00', 'dayBuyingPower': '0.00', 'overnightBuyingPower': '0.00', 'settledFunds': '0.00', 'unsettledFunds': '0.00', 'cryptoBuyingPower': '0.00', 'optionBuyingPower': '0.00', 'riskStatus': 'Safe', 'remainTradeTimes': 'Unlimited'}

So, it's NOT working either.

And if you do

>>> wb.get_detail()

...it runs into json.decoder.JSONDecodeError: error

LukeWang01 commented 1 month ago

@LukeWang01 I am looking through the HTTP requests on the Network tab and I can't find the access token. Where do you see it after logging into Webull on chrome?

please refer to this link https://github.com/LukeWang01/Program-Trading-Based-on-Webull/blob/main/docs/first_run_setup.md

There are screenshots easy to follow.