users
List GPG keys for a user
Lists the GPG keys for a user. This information is accessible by anyone.
get/users/{username}/gpg_keys
Path parameters
usernamestring required
The handle for the GitHub user account.
Query parameters
per_pageinteger
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
pageinteger
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Response
Response
Example response
[
{
"id": 3,
"name": "Octocat's GPG Key",
"key_id": "3262EFF25BA0D270",
"public_key": "xsBNBFayYZ...",
"emails": [
{
"email": "octocat@users.noreply.github.com",
"verified": true
}
],
"subkeys": [
{
"id": 4,
"primary_key_id": 3,
"key_id": "4A595D4C72EE49C7",
"public_key": "zsBNBFayYZ...",
"emails": [],
"can_sign": false,
"can_encrypt_comms": true,
"can_encrypt_storage": true,
"can_certify": false,
"created_at": "2016-03-24T11:31:04-06:00",
"expires_at": null,
"revoked": false
}
],
"can_sign": true,
"can_certify": true,
"created_at": "2016-03-24T11:31:04-06:00",
"revoked": true
}
]