urbackup-server-python-web-api-wrapper
urbackup-server-python-web-api-wrapper copied to clipboard
Can not login to server
Hello.
I try to connect to my urbackup server, but I can't. My code looks like:
import urbackup_api server = urbackup_api.urbackup_server("http://10.10.10.10:55414/x", "username", "xxxxxx") server.get_client_authkey("client_host")
The first error is the readall() in line 87. From Python 3.5, this is not a valid function. I changed this, but now I get always: Username does not exist Tried to print the salt variable from line 81: {'error': 1}
Do you have any idea, or can you help me? Thanks in advance.
It works using the code downbelow in Python 3.7 in my fixed/updated version.
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
from urbackup_api import urbackup_server
s = urbackup_server('http://185.233.xxx.xxx:55414/x', 'api_test', 'supersecret')
s.login()
print(s.get_client_authkey('nog.een.machine'))