# Get a authn key to start an authentication flow

Endpoint: GET /api/secure/{environment_name}/getKey
Version: 26.0.0
Security: ApiKeyAuth

## Security:

  - `ApiKeyAuth` (unknown)
    apiKey in header Esp-Api-Key

## Path parameters:

  - `environment_name` (string, required)
    The environment path provided by Namirial during the assessment phase

## Query parameters:

  - `level` (integer)
    Authentication level. Accepted values: 1, 2, 3.

  - `attributes` (string, required)
    Attribute set to request. Accepted values: `Base`, `Full`.

  - `spidType` (string)
    SPID SAML Purpose value. Applies to SPID authentication only.

## Response 200:

  - `200` (unknown)
    The authn key

## Response 400:

  - `400` (unknown)
    The input parameters are missing or invalid

## Response 401:

  - `401` (unknown)
    Unauthorized. The API key is missing or invalid.

## Response 403:

  - `403` (unknown)
    Forbidden error

## Response 404:

  - `404` (unknown)
    Environment not found.

