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

# Login using a private key

> Login using a private key of a valid Stratumn user



## OpenAPI

````yaml api-reference/open-api-v2.json post /v2/login/privateKey
openapi: 3.0.0
info:
  title: Stratumn API
  description: Interact with Stratumn using simple REST endpoints
  version: 2.0.0
  contact: {}
servers:
  - url: http://api.local.stratumn.com:3000
    description: Local development server
  - url: https://api.stratumn.com
    description: Stratumn Production Server
  - url: https://api.us.stratumn.com
    description: Stratumn US Production Server
  - url: https://api.preprod.stratumn.com
    description: Stratumn Preprod Server
  - url: https://api.preprod.us.stratumn.com
    description: Stratumn US Preprod Server
security: []
tags: []
paths:
  /v2/login/privateKey:
    post:
      tags:
        - Login
      summary: Login using a private key
      description: Login using a private key of a valid Stratumn user
      operationId: LoginControllerV2_loginPrivateKey
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoginPrivateKeyDto'
      responses:
        '200':
          description: The jwt auth token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenV2Dto'
components:
  schemas:
    LoginPrivateKeyDto:
      type: object
      properties:
        privateKey:
          description: The private key used to login
          type: string
      required:
        - privateKey
    TokenV2Dto:
      type: object
      properties:
        error:
          description: The error of the request
        data:
          description: The data of the request
          type: object
          properties:
            token:
              description: >-
                The token needed (in authorization header) to authenticate
                requests
              type: string
          required:
            - token
      required:
        - error

````