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

# Login For Access Token

> Login for an access token using the data from the `OAuth2PasswordRequestForm`.



## OpenAPI

````yaml https://dev-api.cattix.com/openapi.json post /api/v1/users/authorization/token
openapi: 3.1.0
info:
  title: CATTIX API
  description: CATTIX Backend API
  version: 0.107.0
servers:
  - url: http://localhost:8000
    description: Local
  - url: https://dev-api.cattix.com
    description: Development
  - url: https://staging-api.cattix.com
    description: Staging
  - url: https://api.cattix.com
    description: Production
security: []
paths:
  /api/v1/users/authorization/token:
    post:
      tags:
        - Users
      summary: Login For Access Token
      description: >-
        Login for an access token using the data from the
        `OAuth2PasswordRequestForm`.
      operationId: login_for_access_token_api_v1_users_authorization_token_post
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/Body_login_for_access_token_api_v1_users_authorization_token_post
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserLoggedInSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_login_for_access_token_api_v1_users_authorization_token_post:
      properties:
        grant_type:
          anyOf:
            - type: string
              pattern: ^password$
            - type: 'null'
          title: Grant Type
        username:
          type: string
          title: Username
        password:
          type: string
          title: Password
        scope:
          type: string
          title: Scope
          default: ''
        client_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Id
        client_secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Secret
        google_recaptcha_response:
          anyOf:
            - type: string
            - type: 'null'
          title: Google Recaptcha Response
      type: object
      required:
        - username
        - password
      title: Body_login_for_access_token_api_v1_users_authorization_token_post
    UserLoggedInSchema:
      properties:
        id:
          type: integer
          title: Id
        email:
          type: string
          format: email
          title: Email
        profile:
          $ref: '#/components/schemas/BasicProfileSchema'
        is_google_recaptcha_response_valid:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Whether the Google reCAPTCHA response is valid
        token_type:
          type: string
          title: Token Type
          default: bearer
        access_token:
          type: string
          title: Access Token
      type: object
      required:
        - id
        - email
        - profile
        - access_token
      title: UserLoggedInSchema
      description: The schema for a logged-in user.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BasicProfileSchema:
      properties:
        first_name:
          type: string
          title: First Name
        last_name:
          type: string
          title: Last Name
        phone_number:
          anyOf:
            - type: string
              maxLength: 15
              minLength: 9
            - type: 'null'
          title: The phone number of the user
      type: object
      required:
        - first_name
        - last_name
      title: BasicProfileSchema
      description: The base schema for a profile.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````