> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neuro-tech.io/llms.txt
> Use this file to discover all available pages before exploring further.

# WWW login

> Allows the client to authenticate itself with the API, using the  WWW-Authenticate Header available in the HTTP protocol.
If authentication succeeds, a JSON Web Token (or JWT) is returned to the client.

## Overview

Allows the client to authenticate itself with the API, using the  WWW-Authenticate Header available in the HTTP protocol.

If authentication succeeds, a JSON Web Token (or JWT) is returned to the client. This token can be used as a Bearer token in subsequent calls to the API. It needs to be refreshed before it expires.

Security Notice: Some WWW-Authentication mechanism send the password in clear text. While encryption is required, password is still unpacked by the remote endpoint, which may be a security consideration. Use the Login or QuickLogin resources to avoid this. The Javascript library  uses the these resources instead of the WwwLogin alternative. But if a client is unable to generate  cryptographic signatures as required by the specification, traditional WWW-Authentication mechanisms  are also available.

## HTTP request

`POST /Agent/Account/WwwLogin`

## Authentication

No authentication required.

## Request (JSON)

```json theme={null}
{
	"seconds":Required(Int(0 < PSeconds <= 3600))
}
```

## Input parameters

| Parameter | Description                                                                   |
| --------- | ----------------------------------------------------------------------------- |
| PSeconds  | Requested number of seconds before the JWT token that will be issued expires. |

## Response (JSON)

```json theme={null}
{
	"jwt":Required(Str(PJwt)),
	"expires":Required(DateTime(PExpires))
}
```

## Response parameters

| Parameter | Description                                                                                                                                                                                     |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| PJwt      | A token representing the login to the account. This token is seant as a Bearer token in requests requiring authentication.                                                                      |
| PExpires  | When the JWT token expires. The token needs to be renewed before this token expires, if the client wishes to maintain the connection. After the token expires, the client needs to login again. |

## Notes

This endpoint uses the request schema notation described in [Pattern matching](/guides/pattern-matching).
