ZenTao 11.5.1 has added Password-Free Login for third-party applictions interated in ZenTao.
1. Set Password-Free Login on
Go to Admin-Develop-Application. Click "Add Application" and set Password-Free Login ON.
2. Set the key for Password-Free Login
Let's say your ZenTao URL is www.zentao.pm or http://47.105.128.128/biz. Then the request is http://www.zentao.pm/api.php?m=user&f=apilogin&account=account&code=test&time=timestamp&token=token
or http://47.105.128.128/biz/api.php?m=user&f=apilogin&account=account&code=test&time=timestamp&token=token
Note
- m: module name, fixed and unchangeable
- f: function name, ixed and unchangeable
- account: zentao username you want to log in
- code: application alias
- time: current time, use PHP time() to get. Valid for only once.
- token: combination of code, application key, and time() string, and then md5 encryption.
$code = 'test'; $key = '1f1bd171fee20863b44e777e00817e55'; $time = '1557034496'; $token = md5($code . $key . $time);
3. Error message
401 Parameter or application key missing
403 Restricted access
404 Application does not exist
405 Invalid token
406 User does not exist
407 Wrong time