If API is disabled for this user: error: "API_DISABLED"
If specified username and password are incorrect: error: "LOGIN_ERROR"
In case it isn’t immediately obvious, you have to login and get a
session ID even if you are using single user mode. You can omit user and
password parameters.
On version:1.6.0 and above login also returns current API level as an api_level integer, you can use that instead of calling
getApiLevel after login.
### login
Parameters:
- user (string)
- password (string)
Returns client session ID.
```json
{"session\_id":"xxx"}
```
It can also return several error objects:
- If API is disabled for this user:
<code>error: "API_DISABLED"</code>
- If specified username and password are incorrect:
<code>error: "LOGIN_ERROR"</code>
In case it isn’t immediately obvious, you have to login and get a
session ID even if you are using single user mode. You can omit user and
password parameters.
On version:1.6.0 and above login also returns current API level as an
<code>api\_level</code> integer, you can use that instead of calling
getApiLevel after login.
login
Parameters:
Returns client session ID.
It can also return several error objects:
error: "API_DISABLED"
error: "LOGIN_ERROR"
In case it isn’t immediately obvious, you have to login and get a
session ID even if you are using single user mode. You can omit user and
password parameters.
On version:1.6.0 and above login also returns current API level as an
api_level
integer, you can use that instead of callinggetApiLevel after login.