Skip to main content

List GPG keys for a user

Lists the GPG keys for a user. This information is accessible by anyone.

GET/users/{username}/gpg_keys
Source
github-v3-rest.json
Revision
f5f067c1e6f6
Active snapshot
85e53e3d0d65

Request

Path Parameters
username string
required
Query Parameters
per_page integer
optional

Results per page (max 100)

page integer
optional

Page number of the results to fetch.

Responses

application/json array[GPG Key object]

Response

Headers
Link string
Example:
<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"
items GPG Key object

A unique encryption key

can_certify boolean
required

Example: true

can_encrypt_comms boolean
required
can_encrypt_storage boolean
required
can_sign boolean
required

Example: true

created_at string<date-time>
required

Example: 2016-03-24T11:31:04-06:00

emails array[object]
required
Example:
[
  {
    "email": "[email protected]",
    "verified": true
  }
]
items object
email string
optional
verified boolean
optional
expires_at string<date-time>
requirednullable
id integer
required

Example: 3

key_id string
required

Example: 3262EFF25BA0D270

primary_key_id integer
requirednullable
public_key string
required

Example: xsBNBFayYZ...

raw_key string
requirednullable
subkeys array[object]
required
Example:
[
  {
    "can_certify": false,
    "can_encrypt_comms": true,
    "can_encrypt_storage": true,
    "can_sign": false,
    "created_at": "2016-03-24T11:31:04-06:00",
    "emails": [],
    "expires_at": null,
    "id": 4,
    "key_id": "4A595D4C72EE49C7",
    "primary_key_id": 3,
    "public_key": "zsBNBFayYZ...",
    "subkeys": []
  }
]
items object
can_certify boolean
optional
can_encrypt_comms boolean
optional
can_encrypt_storage boolean
optional
can_sign boolean
optional
created_at string
optional
emails array
optional
expires_at string
optionalnullable
id integer
optional
key_id string
optional
primary_key_id integer
optional
public_key string
optional
raw_key string
optionalnullable
subkeys array
optional