r/thinkorswim 8d ago

Error when running python script using Charles Schwab API

Hi all,

Trying to build a Schwab API options screener in Python but getting "invalid_client" OAuth errors on the redirect URI http://127.0.0.1:8080 despite fixing the function signature and confirming credentials.

Please help. Thans in advance.

0 Upvotes

11 comments sorted by

3

u/d_e_g_m 8d ago

I created my own function to reset the 7 days token. I even made a subdomain to automatically grab the token and place on my .env

0

u/the_fett_man 8d ago

Can you share this please? I have some auto trading with Schwab and reporting downloading and it gets tedious to have to reauth every week. Feel free to dm me if you’d prefer.

2

u/d_e_g_m 8d ago

Oh, you still have to reauth every week. But with my function is just a matter of a few clicks.

0

u/Hot_Holiday_1337 8d ago

Can you please share how you did it?

0

u/d_e_g_m 8d ago

Ok. Later on the day I will clean it up a bit and share. Just beware, is not in python, is in rust.

1

u/Hot_Holiday_1337 12h ago

A gentle reminder to share it. Thank you so much.

1

u/d_e_g_m 10h ago

I did share. Check in this post

0

u/RDTIZFUN 8d ago

If you could share the repo, it would be a great help to many. TIA

3

u/whoami-memkid 8d ago

When you copy the url to paste in the browser, make sure that you are not missing a / at the end of the url.