Login User
POST
/users/{id}/login
Create a user/reseller/admin session for the Installatron Server GUI.Note: this API was previously named guixfer . That name will continue to work.
Parameters
API
/users/{id}/login
API endpoint. {id} is the username of the user to create a GUI session for.
POST
Optional parameters
The language to use for this login session to the application. For example,
en
for English or
zh_tw
for Chinese Traditional.
Use the /api/is/browser/view to retrieve a list of available languages for the application.
default is the the language configured for the user
Response
Response
HTTP status code describing the result of the request.
200
for
Success .
All other numbers represent errors which are described in the
errcode output below.
Session ID created for this login.
(eg.
RMXIft8-8HExkSXbTooEvg
)
true
= Success.
false
= Failure.
status code 403
invalid_api_key
The server's Installatron Server Key is invalid.
invalid_argument_user
User specified is not authorized to access this data.
status code 404
user_not_found
The specified user could not be found in the Installatron Server database.
Message describing the result of the request. Do not rely on this to determine the success or failure of the request.
URI to access Installatron's GUI, in the general form of
https://ip-74-208-16-176.is.direct/RMXIft8-8HExkSXbTooEvg
.
PHP
CURL
CLI
Full Examples
Example: Create a session for Installatron Server's GUI for a user owned by the main administrator Method: curl
Installatron Product: Installatron Server
curl -X POST https://{SERVER_IP}/users/useraccountname/login \
-H 'X-API-KEY: {the key= or key2= value from /usr/local/installatron/etc/settings.ini}' \
-H 'Accept: application/json'
Response: json
{
"result": true,
"status": 200,
"errcode": null,
"errfield": null,
"message": "The task is complete.\n"
"data": "https://ip-123-123-123-123.is.direct/RMXIft8-8HExkSXbTooEvg"
}
Full Examples
Example: Create a session for Installatron Server's GUI for a user owned by the main administrator Method: json payload to curl
Installatron Product: Installatron Server
Response: json
{
"result": true,
"status": 200,
"errcode": null,
"errfield": null,
"message": "The task is complete.\n"
"data": "https://ip-123-123-123-123.is.direct/RMXIft8-8HExkSXbTooEvg"
}
Full Examples
Example: Create a session for Installatron Server's GUI for a user owned by the main administrator Method: curl, php, and a user's login
Installatron Product: Installatron Server
<?php
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_URL => "https://{SERVER_IP}/users/useraccountname/login",
CURLOPT_HTTPHEADER => [
"X-API-KEY: {the key= or the key2= value from /usr/local/installatron/etc/settings.ini}",
"Accept: application/json"
],
CURLOPT_RETURNTRANSFER => true
]);
if (( $response = curl_exec($ch) )=== false )
{
trigger_error(curl_error($ch));
}
curl_close($ch);
var_export(json_decode($response, true));
?>
Response: json
{
"result": true,
"status": 200,
"errcode": null,
"errfield": null,
"message": "The task is complete.\n"
"data": "https://ip-123-123-123-123.is.direct/RMXIft8-8HExkSXbTooEvg"
}
Full Examples
Example: Create a session for Installatron Server's GUI for a user owned by the main administrator Method: cli
Installatron Product: Installatron Server
/usr/local/installatron/installatron \
--POST /users/useraccountname/login
Response: json
{
"result": true,
"status": 200,
"errcode": null,
"errfield": null,
"message": "The task is complete.\n"
"data": "https://ip-123-123-123-123.is.direct/RMXIft8-8HExkSXbTooEvg"
}
Full Examples
Example: Create a session for Installatron Server's GUI for a user owned by the main administrator Method: json payload from cli
Installatron Product: Installatron Server
Response: json
{
"result": true,
"status": 200,
"errcode": null,
"errfield": null,
"message": "The task is complete.\n"
"data": "https://ip-123-123-123-123.is.direct/RMXIft8-8HExkSXbTooEvg"
}