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

Authentication procedure #2

Open
illpack opened this issue May 30, 2019 · 1 comment
Open

Authentication procedure #2

illpack opened this issue May 30, 2019 · 1 comment

Comments

@illpack
Copy link

illpack commented May 30, 2019

Maybe a dumb question, but I am a first-time user.
What parameters go into the Client instance?
From Navitia I got username, password, Application and Token.
How do I access the API with your Client class?

You first have to ask for an API key, for Navitia API, you can get it here. Suppose you have it:

from navitia_client import Client

client = Client(user=NAVITIA_USER)
client.set_region("fr-idf")

Thanks,

@n-pizzetta
Copy link

Hi @illpack,

I came across your issue with almost 6 years of delay but hopefully this helps someone out there !

To use the navitia_client, you need to instantiate the Client class using your API key (Token) provided by Navitia :

from navitia_client import Client

# Replace 'YOUR_NAVITIA_API_KEY' with your actual Token
client = Client(user='YOUR_NAVITIA_API_KEY')
client.set_region('fr-idf')

You do not need to provide your username, password, or Application for accessing the API with navitia_client.

Happy coding !! 🚀

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

2 participants