Skip to content

Access token not refreshing  #349

@bman393

Description

@bman393

Description of Bug
I created my token with client_from_manual_flow, all my inputs are correct. It then only gives me a expires_in token of 1800 (30 min).

Then I use schwab.auth.client_from_token_file to create my client which is also suppose to refresh my token as well right? But my token still expires on the first set 30 min

My token file exists on the same level as the code I am using to grab quotes. Here is my code:

`from schwab.auth import client_from_manual_flow

api_key='',
app_secret='',
callback_url='https://127.0.0.1',
token_path='/mnt/c/Users/Brogan/Documents/tickerStats/schwab-py/token.json'

def getPrice(ticker):

client = schwab.auth.client_from_token_file(token_path, api_key, app_secret)

r = client.get_quote(ticker)

r=r.json()
print(r)

getPrice('$SPX')`

Expected Behavior
I expect the access token to update to a new expire time.

Actual Behavior
Instead, the token still expires at my original set time from the manual token creation. I have to manually create the token every 30 min to access schwab

Error/Exception Log, If Applicable
log.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions