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

# Login

> DEPRECATED: Use as a fallback method only - Phrase Platform API tokens should be the preferred way. Returns information about the user with the token to be used in the Authorization header and its expiration date.



## OpenAPI

````yaml /openapi/phrase-language-ai.json post /v1/auth/login
openapi: 3.0.2
info:
  title: Phrase Language AI via API
  description: >
    ### Machine translation powered by [Phrase](https://phrase.com) allows the
    translation of content utilizing  a unique AI powered feature to pick the
    best available translation engine for that content.
  version: 1.0.0
  termsOfService: https://phrase.com/terms/
  contact:
    url: https://phrase.com
servers:
  - url: https://eu.phrase.com/smt/api/
    description: The API server for EU data center.
  - url: https://us.phrase.com/smt/api/
    description: The API server for US data center.
security:
  - BearerAuth: []
tags:
  - name: File translations
    description: >-
      Allows the processing files asynchronously with the file being uploaded
      and stored in Phrase.  Files can be either stored or translated by the
      best available MT engine. File TTL is limited to 24 hours  after which the
      file is deleted from storage.
  - name: Authentication
    description: >
      Allows the authentication of a user and to get the token to be used in the
      Authorization header.
  - name: Text translations
    description: >
      Allows the translation of text content utilizing Phrase Language AI
      capabilities. APIs are synchronous, 

      designed for quick turnaround and are limited in size of the request.
paths:
  /v1/auth/login:
    post:
      tags:
        - Authentication
      summary: Login
      description: >-
        DEPRECATED: Use as a fallback method only - Phrase Platform API tokens
        should be the preferred way. Returns information about the user with the
        token to be used in the Authorization header and its expiration date.
      operationId: loginV1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoginRequestV1'
      responses:
        '200':
          description: Successful login.
          headers:
            Memsource-Action-Id:
              $ref: '#/components/headers/MemsourceActionId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoginResponseV1'
        '400':
          $ref: '#/components/responses/Tms400'
        '401':
          $ref: '#/components/responses/Tms401'
        '403':
          $ref: '#/components/responses/Tms403'
        '404':
          $ref: '#/components/responses/Tms404'
        '405':
          $ref: '#/components/responses/Tms405'
        '408':
          $ref: '#/components/responses/Tms408'
        '410':
          $ref: '#/components/responses/Tms410'
        '415':
          $ref: '#/components/responses/Tms415'
        '429':
          $ref: '#/components/responses/Tms429'
        '500':
          $ref: '#/components/responses/Tms500'
        '501':
          $ref: '#/components/responses/Tms501'
      deprecated: true
      security: []
components:
  schemas:
    LoginRequestV1:
      type: object
      properties:
        userName:
          type: string
        password:
          type: string
        otpCode:
          type: string
        organization:
          $ref: '#/components/schemas/OrganizationUidV1'
      required:
        - password
        - userName
    LoginResponseV1:
      type: object
      properties:
        token:
          type: string
        tokenType:
          $ref: '#/components/schemas/TokenTypeEnumV1'
        expires:
          type: string
      required:
        - token
        - tokenType
        - expires
    OrganizationUidV1:
      type: object
      properties:
        uid:
          type: string
    TokenTypeEnumV1:
      type: string
      enum:
        - Bearer
  headers:
    MemsourceActionId:
      description: Memsource action identifier used for tracking request across services.
      schema:
        type: string
  responses:
    Tms400:
      description: Bad request
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
    Tms401:
      description: Not authorized
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
    Tms403:
      description: Forbidden
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
    Tms404:
      description: Resource not found
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
    Tms405:
      description: Method not allowed
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
    Tms408:
      description: Timeout
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
    Tms410:
      description: Gone
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
    Tms415:
      description: Unsupported media type
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
    Tms429:
      description: Too many requests
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
    Tms500:
      description: Internal server error
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
    Tms501:
      description: Not implemented
      headers:
        Memsource-Action-Id:
          $ref: '#/components/headers/MemsourceActionId'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Provide `Authorization` header with token obtained through
        [Login](/en/api/language-ai/authentication/login) operation.

````