Skip to main content

login

The login command authenticates a user with the DisplayNet API.

Command TypeDisplayNet
Minimum Version2.x.x

Usage

login <username> <password>

Arguments

ArgumentRequiredDescription
usernameYesThe username to log in with. Case-insensitive.
passwordYesThe password for the user.
Optional login

The login command is not needed to use the API if authentication is not required. Users may still authenticate in that case, for example to change server settings.

First login creates DNAdmin

On first login, if the DNAdmin account does not yet exist, it is created automatically with the credentials provided.

Examples

Authenticate as the admin user
login dnadmin password

Return value

The reply is a DN_AUTHENTICATION message. auth_details.IsAuthenticated carries the outcome, and a successful login includes a LoginToken for use with logintoken. A failed login is followed by a second reply, an ERROR with reason AUTH API ERROR.

login dnadmin password
{
"status": "DN_AUTHENTICATION",
"request_id": null,
"result": null,
"error": null,
"auth_details": {
"IsAuthenticated": true,
"UserName": "DNAdmin",
"UserFullName": "DNAdmin",
"Role": "Admin",
"ClientAddress": "127.0.0.1:51684",
"AuthState": "COMPLETE",
"AuthenticationDateTime": "2026-07-31T22:55:00.9897486Z",
"ConnectionType": "Socket",
"LoginToken": "9919abb5-24d0-4c56-bbf1-3df91998247c"
}
}

REST API

Endpoint typeDisplayNet API command
AddressPOST /api/displaynet/login. This one has its own endpoint and cannot be named in a request body.
RoleNone. This one is reachable without a token, whether or not the server requires authentication.
OperationParameters
loginuser password

See also

  • logintoken: re-authenticate with a saved token
  • logout: end the authenticated session
  • user: manage user accounts