Skip to content

Workaround for Login ‐ Method 2

Jason E Rush edited this page Nov 17, 2023 · 1 revision

This is the updated version for the image verification workaround.

WHEN USING THIS METHOD, IGNORE METHOD 1

You do not need to use the "access token" codes for this method

Obtain 'did' code

  1. Visit https://app.webull.com/ and log in.
  2. Obtain your Refresh Token/DID
    • Google Chrome or Microsoft Edge via Javascript
      1. Copy the following into your browser address bar javascript:alert( document.cookie.match(new RegExp('(^| )web_did=([^;]+)'))[2] );
        • Note that your browser may remove the javascript: prefix. You may have to manually re-type that part.
      2. Copy the string that's displayed. That is your 'Refresh Token' or 'did'.
        • image
    • Other Browsers or manually
      1. Click on the "trade" tab in the top menu. It should open up a new page.

      2. Login from this new page. You should see an image verification and may need to verify with a phone number.

      3. Open "Inspector", go to "Network". You should refresh the page once you are done logging in.

      4. You can find your Access Token and Refresh Token in many of files listed. Just click on one (such as 'v2', 'get', 'all', or 'config')

        • image
      5. Look in the "Headers" tab under the "Request Headers" heading for the "did" entry:

        • image

Manually set 'did' for each request

wb = webull()

wb._did = "whatever the did is should be tons of random letters an numbers but should be in hex"

wb.login(email, pw)

wb.get_trade_token(code)

After this, you should be able to access your account via this API.

Manually set 'did' once to be reused

This will generate a did file and save it in your project.

wb = webull()

wb._set_did("whatever the did is should be tons of random letters an numbers but should be in hex")

REMINDER: You do not need to use the "access token" things. I repeat, COMPLETELY IGNORE METHOD 1!!!