kbr / fritzconnection

Python-Tool to communicate with the AVM Fritz!Box by the TR-064 protocol and the AHA-HTTP-Interface
MIT License
304 stars 59 forks source link

AuthorizationError when trying to log in #1

Closed TheLastProject closed 4 years ago

TheLastProject commented 4 years ago

When I try to login through the library, I get an AuthorizationError. I can confirm the same login info lets me log into the web UI.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sylvia/.local/lib/python3.7/site-packages/fritzconnection/fritzconnection.py", line 456, in reconnect
    self.call_action('WANIPConnection', 'ForceTermination')
  File "/home/sylvia/.local/lib/python3.7/site-packages/fritzconnection/fritzconnection.py", line 449, in call_action
    return action.execute(**kwargs)
  File "/home/sylvia/.local/lib/python3.7/site-packages/fritzconnection/fritzconnection.py", line 134, in execute
    raise AuthorizationError('unauthorized request')
fritzconnection.fritzconnection.AuthorizationError: unauthorized request

Any clue what could be wrong and how I could figure it out? Do I have an unsupported model perhaps? (FRITZ!Box 7581)

kbr commented 4 years ago

There has been a change in version 0.8. Accessing the service 'WANIPConnection' now needs a password. I have updated the the documentation with version 0.8.4 and also removed a bug using the wrong service to make a reconnect (using the 'WANIPConn' service which works without a password).