credentials.json
to index. I already have the users access_token
, is there a way to pass this directly without the need to create the credentials file every time? I figure if two people make a request at the same time this file is just going to be overwritten?info = { "access_token": result["access_token"], "refresh_token": result["refresh_token"], "client_id": os.environ['CLIENT_ID'], "client_secret": os.environ['CLIENT_SECRET'], "scopes": result["scope"], } # TODO: Update db with new token and refresh token creds = Credentials.from_authorized_user_info(info=info) if not creds or not creds.valid: if creds and creds.expired and creds.refresh_token: creds.refresh(Request())