Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A Few Suggestions #24

Open
csaleman opened this issue Sep 29, 2022 · 0 comments
Open

A Few Suggestions #24

csaleman opened this issue Sep 29, 2022 · 0 comments

Comments

@csaleman
Copy link
Contributor

csaleman commented Sep 29, 2022

First thank you for for this API. Took me way too long to get the td_credentials.json file. So here is a list of issues I found.

  1. The instructions don't show an example of the config.init file.
    [main]
    client_id = MY-OWN-CLIENT-ID
    redirect_uri = MY-REDIRECT-URI

  2. The example fails to generate a credential.json in order to initiate the oauth workflow the line below needs to be omitted.

    credential_file='config/td_credentials.json'

  3. URL was not showing, I'm developing on a VM without a web browser. So I added a print(url) on credentials.py right after line 468

    webbrowser.open(url=url)
    print(url)

  4. After entering the code, nothing actually got saved, The token file was available but not saved. So I added the

td_credentials.to_credential_file('config/td_credentials.json')

# Initialize the Parser.
config = ConfigParser()

# Read the file.
config.read('config/config.ini')

# Get the specified credentials.
client_id = config.get('main', 'client_id')
redirect_uri = config.get('main', 'redirect_uri')

# Intialize our `Credentials` object.
td_credentials = TdCredentials(
    client_id=client_id,
    redirect_uri=redirect_uri
)

td_credentials.to_credential_file('config/td_credentials.json')
@csaleman csaleman changed the title Few Sugestions A Few Suggestions Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant