List the authenticated user's GPG keys
const url = 'https://gitea.com/api/v1/user/gpg_keys';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://gitea.com/api/v1/user/gpg_keys \ --header 'Authorization: Basic <credentials>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Page number of results to return (1-based)
Page size of results
Responses
Section titled “Responses”GPGKeyList
GPGKey a user GPG key to sign commit and tag in repository
object
Whether the key can be used for certification
Whether the key can be used for encrypting communications
Whether the key can be used for encrypting storage
Whether the key can be used for signing
The date and time when the GPG key was created
List of email addresses associated with this GPG key
GPGKeyEmail an email attached to a GPGKey
object
The email address associated with the GPG key
Whether the email address has been verified
The date and time when the GPG key expires
The unique identifier of the GPG key
The key ID of the GPG key
The primary key ID of the GPG key
The public key content in armored format
Whether the GPG key has been verified
Examplegenerated
[ { "can_certify": true, "can_encrypt_comms": true, "can_encrypt_storage": true, "can_sign": true, "created_at": "2026-04-15T12:00:00Z", "emails": [ { "email": "example", "verified": true } ], "expires_at": "2026-04-15T12:00:00Z", "id": 1, "key_id": "example", "primary_key_id": "example", "public_key": "example", "subkeys": [], "verified": true }]APIUnauthorizedError is an unauthorized error response
Headers
Section titled “Headers”APIForbiddenError is a forbidden error response