GET/users/{username}/gpg_keys

List GPG keys for a user

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

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

3 parameters
usernamestringrequired
The handle for the GitHub user account.
per_pageintegeroptional
The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
Default:30
pageintegeroptional
The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
Default:1

1 status code
200Response
idintegerrequired
namestringoptional
primary_key_idintegerrequired
key_idstringrequired
public_keystringrequired
emailsarray<object>required
subkeysarray<object>required
can_signbooleanrequired
can_encrypt_commsbooleanrequired
can_encrypt_storagebooleanrequired
can_certifybooleanrequired
created_atstringrequired
expires_atstringrequired
revokedbooleanrequired
raw_keystringrequired

Was this helpful?