Open AdriandLiu opened 1 year ago
Okay I think there is an alternative.
First, Webull changed their MFA endpoint again. The latest one is https://u1suser.webullfintech.com/api/user/v1/verificationCode/send/v2
(still unsure about get_security and next_security)
However, if you call this endpoint even with correct payload, it will return you an image URl for image verification (in Postman). What I did to work this around is, recall the approach of how to get the verified device in this thread https://github.com/tedchou12/webull/issues/353#issuecomment-1324429735, you don't have to use mfa when the device id is verified with image sliding, so it basically ends up like
webull.login(email, password)
instead of
webull.login(email, password, mfa_code...)
I did the same thing. I think I mentioned it in the previous thread but as long as you have the device id file, you can login with just the webull.login() function without using any more verification. I just stopped using the accesstoken way and decided to use the way you just mentioned.
@ICANTFINDAUSERNAMEATALL access token seems working well in my case, is there any specific reason to switch?
For me, using het access token thing gave the exact same message:
{'msg': 'AccessToken is expire', 'traceId': 'e85d8088eb33417d9db2e2d467632f99', 'code': 'auth.token.expire'}
Some reason, I just decided to not use the access token and see if it would work and since then, just using: wb.login(my_email, my_pw)
worked for me. Idk if this is just on my end or for everyone else.
Here is the timeline of how things happened:
wb.login(email, pw)
with nothing else. @AdriandLiu try to just use wb.login(email, pw)
. It fixed the problem for me so it might work for you.
@ICANTFINDAUSERNAMEATALL that makes sense to me and thanks a lot for the suggestion!
Okay I think there is an alternative.
First, Webull changed their MFA endpoint again. The latest one is
https://u1suser.webullfintech.com/api/user/v1/verificationCode/send/v2
(still unsure about get_security and next_security)However, if you call this endpoint even with correct payload, it will return you an image URl for image verification (in Postman). What I did to work this around is, recall the approach of how to get the verified device in this thread https://github.com/tedchou12/webull/issues/353#issuecomment-1324429735, you don't have to use mfa when the device id is verified with image sliding, so it basically ends up like
webull.login(email, password)
instead of
webull.login(email, password, mfa_code...)
Where in the code do you add the new endpoint? Do you replace it with something in the endpoints.py and the Webull.py? I tried using the regular wb.login(email, pw) but I still get the accesstoken error @AdriandLiu
I think you can update it right here:
I haven't used the api in a while so IDK if it still works or not
@ICANTFINDAUSERNAMEATALL
Sorry if it's an obvious answer but am I just changing the url for the self.base_user_url to https://u1suser.webullfintech.com/api/user/v1/verificationCode/send/v2 in the second screenshot?
Hi, I'm trying to use _get_mfa_ func to get my mfa code sending to my email. It however raises the following error msg to me
{'msg': 'AccessToken is expire', 'traceId': 'e85d8088eb33417d9db2e2d467632f99', 'code': 'auth.token.expire'}
I also tried _get_security, next_security_, both returned same error as above. All of those funcs does not require any access token before, does Webull change their endpoint again or I missed anything? Any opinions are greatly appreciated!