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

# Login

> Exchange credentials for a short-lived JWT

## Overview

Authenticates a user and returns a JWT. This method is intended for
programmatic clients and is an alternative to browser-based login flows.

## Authentication

Sign the request using HMAC-SHA256 with the account password as the key.

Signature message:

```
userName:host:nonce
```


## OpenAPI

````yaml /test-api/openapi.yaml post /Agent/Account/Login
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/Login:
    post:
      tags:
        - Accounts
      summary: Login
      description: Exchange credentials for a short-lived JWT
      operationId: post_Agent_Account_Login
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                userName:
                  type: string
                nonce:
                  type: string
                signature:
                  type: string
                seconds:
                  type: integer
              additionalProperties: true
              required:
                - userName
                - nonce
                - signature
                - seconds
            example:
              userName: alice
              nonce: random-unique-string-at-least-32-chars
              signature: base64-hmac
              seconds: 3600
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  jwt:
                    type: string
                  expires:
                    type: string
                additionalProperties: true
                required:
                  - jwt
                  - expires
              example:
                jwt: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
                expires: '2024-08-02T11:22:11Z'
      security: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````