List the authenticated user's public keys
const url = 'https://gitea.com/api/v1/user/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/keys \ --header 'Authorization: Basic <credentials>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Fingerprint of the key
Page number of results to return (1-based)
Page size of results
Responses
Section titled “Responses”PublicKeyList
PublicKey publickey is a user key to push code to repository
object
Fingerprint is the key’s fingerprint
ID is the unique identifier for the public key
Key contains the actual SSH public key content
KeyType indicates the type of the SSH key
Updated is the time when the key was last used
ReadOnly indicates if the key has read-only access
Title is the human-readable name for the key
URL is the API URL for this key
User represents a user
object
Is user active
URL to the user’s avatar
The user’s description
User counts
The user’s full name
URL to the user’s gitea page
The user’s id
Is the user an administrator
User locale
The user’s location
Login of the user, same as username
Identifier of the user, provided by the external authenticator (if configured)
Is user login prohibited
Is user restricted
The ID of the user’s Authentication Source
User visibility level option: public, limited, private public UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate
The user’s website
Example
[ { "user": { "login_name": "empty", "visibility": "public" } }]