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

# Send Login Code

> 
  Sends a temporary one time code to the user that can be used during login flow.

If the user has a credential of kind `PasswordProtectedKey` a temporary one time code needs to be passed in the `loginCode` field. That's because the [Create Login Challenge](https://docs.dfns.co/api-reference/auth/create-login-challenge) is unauthenticated and returns the encrypted private key of the user. So we need a first step to verify the identity of the user to prevent anybody from fetching the encrypted private key and trying to brute force it offline.

  



## OpenAPI

````yaml /openapi.yaml post /auth/login/code
openapi: 3.1.0
info:
  version: 1.807.0
  title: Dfns
servers:
  - url: https://api.dfns.io
    description: Default - Europe
  - url: https://api.uae.dfns.io
    description: UAE
  - url: https://api.dfns.ninja
    description: <Deprecated> Staging
security: []
paths:
  /auth/login/code:
    post:
      tags:
        - Auth
      summary: Send Login Code
      description: >2-

          Sends a temporary one time code to the user that can be used during login flow.

        If the user has a credential of kind `PasswordProtectedKey` a temporary
        one time code needs to be passed in the `loginCode` field. That's
        because the [Create Login
        Challenge](https://docs.dfns.co/api-reference/auth/create-login-challenge)
        is unauthenticated and returns the encrypted private key of the user. So
        we need a first step to verify the identity of the user to prevent
        anybody from fetching the encrypted private key and trying to brute
        force it offline.

          
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                orgId:
                  type: string
                  minLength: 1
              required:
                - username
                - orgId
              additionalProperties: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
      security:
        - {}

````