Skip to content

List public keys for a user

GET
/users/{username}/keys

Lists the verified public SSH keys for a user. This is accessible by anyone.

API method documentation

username
required
string

The handle for the GitHub user account.

per_page
integer
default: 30

The number of results per page (max 100). For more information, see “Using pagination in the REST API.”

page
integer
default: 1

The page number of the results to fetch. For more information, see “Using pagination in the REST API.”

Response

Media type application/json
Array<object>
Key Simple

Key Simple

object
id
required
integer
key
required
string
created_at
string format: date-time
last_used
string format: date-time
nullable
Examples
Example default
[
{
"id": 1,
"key": "ssh-rsa AAA..."
}
]
Link
string
Example
<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"