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

# Authenticate a user (deprecated)



## OpenAPI

````yaml https://manage.nervescloud.com/api/openapi post /api/users/login
openapi: 3.0.0
info:
  description: >
    The NervesCloud API gives users full access to their

    Orgs, Products, and corresponding Device fleets.


    The API can be used to integrate with your own systems, providing full
    access to your Product and Device data.


    The API is documented using the OpenAPI 3.0 specification.
  title: NervesCloud API
  version: 2.0.0
servers:
  - url: https://manage.nervescloud.com
    variables: {}
security:
  - bearer_auth: []
tags:
  - description: User authentication and API token creation
    name: Auth
  - description: Organization Certificate Authority management
    name: CA Certificates
  - description: >-
      Device management, including action requests eg. upgrade, reboot,
      reconnect
    name: Devices
  - description: Log lines Devices have sent over the logging extension
    name: Device Logs
  - description: >-
      Device management, including action requests eg. upgrade, reboot,
      reconnect
    name: Devices (short URL)
  - description: Device Certificate management
    name: Device Certificates
  - description: Identities a Device holds on networks NervesHub does not run
    name: Network Identities
  - description: Deployment Group and release management
    name: Deployment Groups
  - description: Firmware uploading and management
    name: Firmwares
  - description: Organization iroh endpoint id registration
    name: Iroh Endpoints
  - description: Organization management
    name: Organizations
  - description: Organization User membership management
    name: Organization Members
  - description: Product management
    name: Products
  - description: Organization Signing Key management
    name: Signing Keys
  - description: Product Support Script management
    name: Support Scripts
  - description: Platform healthcheck
    name: Platform Status
paths:
  /api/users/login:
    post:
      tags:
        - Auth
      summary: Authenticate a user (deprecated)
      operationId: NervesHubWeb.API.UserController.login
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserAuthRequest'
        description: Authentication attributes
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponse'
          description: User response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
      callbacks: {}
      security: []
components:
  schemas:
    UserAuthRequest:
      description: POST body for authenticating a user
      example:
        email: jane@iot-company.com
        note: Local automation
        password: my-secure-password
      properties:
        email:
          type: string
        note:
          type: string
        password:
          type: string
      required:
        - email
        - password
      title: UserAuthRequest
      type: object
    UserResponse:
      description: Response schema for single user
      example:
        data:
          email: jane@iot-company.com
          id: 123
          inserted_at: '2017-09-12T12:34:55Z'
          name: Jane User
          updated_at: '2017-09-13T10:11:12Z'
      properties:
        data:
          $ref: '#/components/schemas/User'
      title: UserResponse
      type: object
    ErrorResponse:
      description: Error response
      example:
        errors:
          detail: Resource Not Found or Authorization Insufficient
      properties:
        errors:
          properties:
            detail:
              type: string
          type: object
      title: ErrorResponse
      type: object
    User:
      description: A registered user
      example:
        email: jane@iot-company.com
        id: 123
        inserted_at: '2017-09-12T12:34:55Z'
        name: Jane User
        updated_at: '2017-09-13T10:11:12Z'
      properties:
        email:
          description: Email address
          format: email
          type: string
        id:
          description: User ID
          type: integer
        inserted_at:
          description: Creation timestamp
          format: date-time
          type: string
        name:
          description: Users name
          pattern: '[a-zA-Z][a-zA-Z0-9_]+'
          type: string
        updated_at:
          description: Update timestamp
          format: date-time
          type: string
      required:
        - name
        - email
      title: User
      type: object
  securitySchemes:
    bearer_auth:
      scheme: bearer
      type: http

````