Skip to content
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
This is the documentation of 1.26.4, which is no longer the latest release. See the latest release.

List the authenticated user's access tokens

GET
/users/{username}/tokens
curl --request GET \
--url https://gitea.com/api/v1/users/example/tokens \
--header 'Authorization: Basic <credentials>'
username
required
string

Username of to user whose access tokens are to be listed

page
integer

Page number of results to return (1-based)

limit
integer

Page size of results

AccessTokenList represents a list of API access token.

Media typeapplication/json
Array<object>
AccessToken represents an API access token.
object
created_at

The timestamp when the token was created

string format: date-time
id

The unique identifier of the access token

integer format: int64
last_used_at

The timestamp when the token was last used

string format: date-time
name

The name of the access token

string
scopes

The scopes granted to this access token

Array<string>
sha1

The SHA1 hash of the access token

string
token_last_eight

The last eight characters of the token

string
Examplegenerated
[
{
"created_at": "2026-04-15T12:00:00Z",
"id": 1,
"last_used_at": "2026-04-15T12:00:00Z",
"name": "example",
"scopes": [
"example"
],
"sha1": "example",
"token_last_eight": "example"
}
]

APIForbiddenError is a forbidden error response

Media typeapplication/json
message
string
url
string