---
title: "Get a public SSH key for the authenticated user"
method: GET
path: "/user/keys/{key_id}"
tags: ["users"]
---

# Get a public SSH key for the authenticated user

`GET /user/keys/{key_id}`

View extended details for a single public SSH key.

OAuth app tokens and personal access tokens (classic) need the `read:public_key` scope to use this endpoint.

## Path parameters

- `key_id` integer, required

## Response `200`

Response

- Key — Key
  - `key` string, required
  - `id` integer, required
  - `url` string, required
  - `title` string, required
  - `created_at` string, date-time, required
  - `verified` boolean, required
  - `read_only` boolean, required
  - `last_used` string, date-time, nullable

## Other responses

- `304` — Not modified
- `401` — Requires authentication
- `403` — Forbidden
- `404` — Resource not found

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-3.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-3/versions/dc0584ac4e13/schema)
