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

"Fail to verify image verification code." #411

Open
M1NL1TE opened this issue Jun 26, 2023 · 12 comments
Open

"Fail to verify image verification code." #411

M1NL1TE opened this issue Jun 26, 2023 · 12 comments
Labels
auth issues Issues authenticating with Webull (creds, MFA, etc)

Comments

@M1NL1TE
Copy link

M1NL1TE commented Jun 26, 2023

@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
Copy link

rakesh433jntu commented Jun 27, 2023

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
Copy link

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
Copy link

@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
Copy link

LukeWang01 commented Jul 6, 2023

Same issue, currently no solution...

@LukeWang01
Copy link

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
Copy link

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

@LukeWang01
Copy link

@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
Copy link

@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
Copy link

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

@jasonrush jasonrush added the auth issues Issues authenticating with Webull (creds, MFA, etc) label Nov 17, 2023
@ICANTFINDAUSERNAMEATALL
Copy link
Collaborator

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
Copy link

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
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth issues Issues authenticating with Webull (creds, MFA, etc)
Projects
None yet
Development

No branches or pull requests

10 participants