dolibarr  9.0.0
Public Member Functions | List of all members
Login Class Reference

API that allows to log in with an user account. More...

Public Member Functions

 __construct ()
 Constructor of the class.
 index ($login, $password, $entity='', $reset=0)
 Login. More...

Detailed Description

API that allows to log in with an user account.

Definition at line 26 of file api_login.class.php.

Member Function Documentation

◆ index()

Login::index (   $login,
  $entity = '',
  $reset = 0 


Request the API token for a couple username / password. Using method POST is recommanded for security reasons (method GET is often logged by default by web servers with parameters so with login and pass into server log file). Both methods are provided for developer conveniance. Best is to not use at all the login API method and enter directly the "DOLAPIKEY" into field at the top right of page. Note: The API key (DOLAPIKEY) can be found/set on the user page.

string$loginUser login
string$passwordUser password
string$entityEntity (when multicompany module is used). '' means 1=first company.
int$resetReset token (0=get current token, 1=ask a new token and canceled old token. This means access using current existing API token of user will fails: new token will be required for new access)
array Response status and user token
500GET / POST /

Definition at line 58 of file api_login.class.php.

The documentation for this class was generated from the following file: