---
title: "Check Who the Current HTTP Session Belongs To"
method: GET
path: "/sessions/whoami"
tags: ["public"]
---

# Check Who the Current HTTP Session Belongs To

`GET /sessions/whoami`

Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated.
Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent.
Additionally when the request it successful it adds the user ID to the 'X-Kratos-Authenticated-Identity-Id' header in the response.

This endpoint is useful for reverse proxies and API Gateways.

## Query parameters

- `Authorization` string

## Headers

- `Cookie` string

## Response `200`

session

- Session
  - `active` boolean
  - `authenticated_at` string, date-time, required
  - `expires_at` string, date-time, required
  - `id` string, uuid4, required
  - `identity` Identity, required
    - `id` string, uuid4, required
    - `recovery_addresses` RecoveryAddress[] — RecoveryAddresses contains all the addresses that can be used to recover an identity.
      - `id` string, uuid4, required
      - `value` string, required
      - `via` string, required
    - `schema_id` string, required — SchemaID is the ID of the JSON Schema to be used for validating the identity's traits.
    - `schema_url` string, required — SchemaURL is the URL of the endpoint where the identity's traits schema can be fetched from. format: url
    - `traits` Traits, required
    - `verifiable_addresses` VerifiableAddress[] — VerifiableAddresses contains all the addresses that can be verified by the user.
      - `id` string, uuid4, required
      - `status` string, required
      - `value` string, required
      - `verified` boolean, required
      - `verified_at` string, date-time
      - `via` string, required
  - `issued_at` string, date-time, required

## Other responses

- `401` — genericError
- `500` — genericError

---

[API](https://skmtc.dev/ory/apis/ory-kratos-api.md) · [All operations](https://skmtc.dev/ory/apis/ory-kratos-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ory/ory-kratos-api/revisions/e77b8bae3f57/schema)
