---
title: "Auth smoke-test"
method: GET
path: "/api/v1/whoami"
tags: ["Auth"]
---

# Auth smoke-test

`GET /api/v1/whoami`

## Request

- Base URL: `https://app.lastping.dev`
- URL: `https://app.lastping.dev/api/v1/whoami`
- Auth: one of:
  - API key in header `X-Api-Key`
  - API key in cookie `lp_session`

Returns the authenticated project_id, and for an API key its kind,
scope and expiry. Useful for verifying the API key is valid and what
it may do. `kind`, `scope` and `expires_at` are null for a console
session. `resource` is present only for an OAuth access token, which
is usable only through the LastPing MCP server.

## Response `200`

API key is valid; returns the associated project_id and the key's kind, scope and expiry.

- object
  - `project_id` string, uuid, required
  - `kind` 'key' | 'oauth' | 'null', nullable, required: `key` for an API key, `oauth` for an OAuth access token made by connecting an app; null for a console session.
  - `scope` 'read' | 'write' | 'admin' | 'ingest' | 'null', nullable, required: The credential's scope; null for a console session.
  - `expires_at` string, date-time, nullable, required: When the credential expires; null when it never does, and for a console session.
  - `resource` string: The MCP resource an OAuth access token was issued for. Present only when kind is oauth.

## Other responses

- `401`: Missing or invalid API key.

---

[API](https://skmtc.dev/lastping/apis/lastping-management-api.md) · [All operations](https://skmtc.dev/lastping/apis/lastping-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/lastping/apis/lastping-management-api/revisions/bbc6eda91c46?raw)
