GET
/user/gpg_keysList GPG keys for the authenticated user
Lists the current user's GPG keys.
OAuth app tokens and personal access tokens (classic) need the read:gpg_key scope to use this endpoint.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
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)."
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)."
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
304Not modified
401Requires authentication
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
Error handling
A 401 is returned: Requires authentication. A 403 is returned: Forbidden. A 404 is returned: Resource not found.
Was this helpful?