---
title: "Get info about current API key"
method: GET
path: "/api/projects/api-key-info"
tags: ["Projects"]
---

# Get info about current API key

`GET /api/projects/api-key-info`

## Request

- Base URL: `https://studio.edgeimpulse.com/v1`
- URL: `https://studio.edgeimpulse.com/v1/api/projects/api-key-info`
- Auth: one of:
  - API key in header `x-api-key`
  - API key in cookie `jwt`
  - API key in header `x-jwt-token`
  - OAuth 2
    - Authorization code: `/v1/oauth/authorize`
    - Client credentials
    - Implicit: `/v1/oauth/authorize`
    - Password
    - Token URL: `/v1/oauth/token`
- TypeScript: <https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/docs/api/projects/api-key-info/get.ts> (a function with typed inputs; its response is checked against the schema)

Only available when authenticating with a project API key. Returns the current role and project ID that you're authenticated with.

## Response `200`

OK

- GetCurrentApiKeyInfoResponse
  - `success` boolean, required: Whether the operation succeeded
  - `error` string: Optional error description (set if 'success' was false)
  - `apiKeyId` integer, required
  - `projectId` integer, required
  - `role` 'admin' | 'readonly' | 'ingestiononly' | 'ingestion_deployment', required
  - `expires` string, date-time: The expiration date of the API key. Only present when the key has a TTL set.
  - `anonymousUserId` string: Only present when the API key was created for an extension. An anonymized, but stable ID for the user that granted the extension access. The ID is unique per extension (same across projects), and does not reveal any information about the user. Extensions can use this to keep sessions or per-user state. This matches the `anonymousUserId` query parameter that is passed to the extension.

---

[API](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api.md) - [All operations](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/llms.txt) - [OpenAPI document](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/revisions/e2a976d38427?raw)
