urbackup-server-python-web-api-wrapper icon indicating copy to clipboard operation
urbackup-server-python-web-api-wrapper copied to clipboard

Can not login to server

Open vepeti opened this issue 7 years ago • 1 comments

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.

vepeti avatar Feb 21 '18 08:02 vepeti

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'))

YWatchman avatar Oct 24 '19 05:10 YWatchman