API Call for Open Authentication

2018-06-28 14:40:09
Last edited by tengfei on 2019-12-19 10:22:37

Session login is involved when using API to integration. The following three steps will be required.

1. Get the session

First, use getSessionID to get the session.

  • GET: ?m=api&f=getSessionID&t=json
  • PATHINFO: api-getsessionid.json

The returned will be sessionName and sessionID.

The way to pass sessions to the server much be cookies or GET. The most simple way is to add $sessionName=$sessionID to the URL requested. For example, http://pms.zentao.net/index.json?zentaosid=xxxxxxx.


The parameter of sid in the URL above can be set by $config->sessionVar in config.php. For example, set $config->sessionVar = 'zentaosid' in config/config.php of ZenTao.

2. User ID Authentication

Use login method in user module to authenticate user ID. Username and password are required to authenticate user ID, and should be passed to user-login in post method.

Variable names: account, password.

3. Call API

After user authentication, you can call API from the HTML page or getModel.


It is only applied to ZenTao. Zsite or Zdoo doesn't support it.

Smiseepielt 2019-02-04 13:29:35
fsewai <a href="https://icbdoilonline.com/#">cannabis oil for chronic pain</a>
Write a Comment
Comment will be posted after it is reviewed.