mockingbirdconsulting / pychirp

A python library for interacting with chirpstack.io
MIT License
7 stars 4 forks source link

unable to login with default non-TLS credentials #25

Open toozie21 opened 4 years ago

toozie21 commented 4 years ago

I am not using TLS and everything is stock. I made the changes based on your answer from July of last year, but the error I get is

python list_devs.py Traceback (most recent call last): File “list_devs.py”, line 7, in chirpstack_pass=“admin” File “C:\Python27\lib\site-packages\pychirp\chirpstack.py”, line 34, in init self.connect() File “C:\Python27\lib\site-packages\pychirp\chirpstack.py”, line 64, in connect auth_header = self._authenticate() File “C:\Python27\lib\site-packages\pychirp\chirpstack.py”, line 51, in _authenticate jwt = auth_tok[‘jwt’] KeyError: ‘jwt’

toozie21 commented 4 years ago

I think that they changed the "username" field to "email", but I am not 100% certain yet.

proffalken commented 4 years ago

Thanks, I'll take a look at this as soon as I get a minute, but it might be worth looking at the official Python API docs at https://www.chirpstack.io/application-server/api/python-examples/ for the time being.