> ## 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.

## Authentication

No authentication required.

## Notes

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


## OpenAPI

````yaml /test-api/openapi.yaml post /Agent/Account/WwwLogin
openapi: 3.1.0
info:
  title: Neuron Agent API
  version: 1.0.0
  description: |-
    The Agent API exposes core Neuron functionality over HTTP so services can
    operate without a persistent XMPP connection. Endpoints are grouped by
    capability, starting with Accounts and XMPP messaging.
servers:
  - url: https://{host}
    variables:
      host:
        default: neuron.example.com
        description: Neuron domain issued to you.
security:
  - bearerAuth: []
tags:
  - name: Accounts
  - name: Crypto
  - name: Open intelligence
  - name: Legal and contracts
  - name: State machines
  - name: Storage
  - name: Tokens
  - name: Wallet
  - name: XMPP messaging
paths:
  /Agent/Account/WwwLogin:
    post:
      tags:
        - Accounts
      summary: Www Login
      description: >-
        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.
      operationId: post_Agent_Account_WwwLogin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                seconds:
                  type: integer
                  exclusiveMinimum: 0
                  maximum: 3600
              additionalProperties: true
              required:
                - seconds
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  jwt:
                    type: string
                  expires:
                    type: string
                    format: date-time
                additionalProperties: true
                required:
                  - jwt
                  - expires
      security: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````