# GET /api/v1/auth/login

**Login with API Key**

## Access Login

Using a [StackHawk API Key](https://app.stackhawk.com/settings/apikeys), this endpoint returns an *access token* which can then be used in the `authorization` header of subsequent API requests.
The access token returned is an [RFC-7519](https://datatracker.ietf.org/doc/html/rfc7519) compliant [jwt access token](https://jwt.io/).

Access tokens have an expiration of *30 minutes* and are issued on behalf of the requesting user.

An access token can only be used to interact with StackHawk resources that belong to the user, or to organizations that user is a part of and permissioned for.

For best practices, use the `/login` route only when starting a new access session to the StackHawk API, and use the `/refresh-token` route to request a fresh token to extend an API session.

## Parameters

- `X-ApiKey` (in: header, string) *(required)* — Specialized request header to supply your **StackHawk API Key** which authorizes further requests.

## Responses

### 200 — * A [JSON Web Token](https://jwt.io/) used to authenticate requests to the StackHawk API

#### application/json

- `token` (string) — the bearer token value

#### application/x-protobuf

- `token` (string) — the bearer token value
