---
title: "Get an API-key associated with a Consumer"
method: GET
path: "/{workspace}/consumers/{ConsumerIdForNestedEntities}/key-auth/{KeyAuthId}"
tags: ["API-keys"]
---

# Get an API-key associated with a Consumer

`GET /{workspace}/consumers/{ConsumerIdForNestedEntities}/key-auth/{KeyAuthId}`

Get an API-key associated with a Consumer using ID.

## Path parameters

- `ConsumerIdForNestedEntities` string, required
- `KeyAuthId` string, required
- `workspace` string, required

## Response `200`

Successfully fetched API-key

- KeyAuth
  - `consumer` object, nullable
    - `id` string
  - `created_at` integer, nullable — Unix epoch when the resource was created.
  - `id` string, nullable — A string representing a UUID (universally unique identifier).
  - `key` string, nullable
  - `tags` string[], nullable — A set of strings representing tags.
  - `ttl` integer, nullable — key-auth ttl in seconds

## Other responses

- `404` — Resource does not exist

---

[API](https://skmtc.net/kong/apis/kong-enterprise-admin-api.md) · [All operations](https://skmtc.net/kong/apis/kong-enterprise-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kong/kong-enterprise-admin-api/revisions/28b1f8a59cdc/schema)
