# login

Authenticates user and returns tokens or challenge in case of success.

Endpoint: POST /login/{tenant_tag}
Version: 1.0

## Path parameters:

  - `tenant_tag` (string, required)
    Tenant Tag

## Request body:

  - `application/json` (unknown)
    Login request params

## Request fields (application/json):

  - `meta_data` (object)

  - `password` (string, required)

  - `username` (string, required)

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `authentication_result` (object)

  - `authentication_result.access_token` (string)

  - `authentication_result.expires_in` (integer)

  - `authentication_result.id_token` (string)

  - `authentication_result.refresh_token` (string)

  - `authentication_result.token_type` (string)

  - `challenge_name` (string)

  - `challenge_parameters` (object)

  - `challenge_parameters.qr_code` (string)

  - `challenge_parameters.required_attributes` (array)

  - `challenge_parameters.secret_code` (string)

  - `challenge_parameters.user_attributes` (object)

  - `challenge_parameters.user_id_for_srp` (string)

  - `data` (object)

## Response 400:

  - `400` (unknown)
    Bad request

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.code` (string)

  - `errors.message` (string)

  - `errors.params` (object)

## Response 500:

  - `500` (unknown)
    Internal server error

## Response 500 fields (application/json):

  - `errors` (array)

  - `errors.code` (string)

  - `errors.message` (string)

  - `errors.params` (object)

