Return token data from handle_token
Notes for dev
This commit is contained in:
parent
89fc8706cb
commit
cd1f0a2ae3
5 changed files with 55 additions and 6 deletions
|
|
@ -26,7 +26,9 @@ API = APIClient(
|
|||
# Keep a token cache to avoid unnecessary sign-ins during development.
|
||||
# (In production, you'd handle this more robustly and securely)
|
||||
|
||||
API.handle_token() # This will load the token from file if it exists and is valid, or sign in to get a new one if not.
|
||||
token_data = API.handle_token() # This will load the token from file if it exists and is valid, or sign in to get a new one if not.
|
||||
if token_data is None or 'access_token' not in token_data:
|
||||
raise Exception("Failed to obtain a valid access token. Please check your credentials and token handling.")
|
||||
|
||||
'''
|
||||
END IMPORTANT BIT
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue