Skip to content
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!

Get the currently authenticated token

GET
/token
curl --request GET \
--url https://gitea.com/api/v1/token \
--header 'Authorization: Basic <credentials>'

CurrentAccessToken represents the currently authenticated access token.

Media typeapplication/json
CurrentAccessToken represents the metadata of the currently authenticated 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>
user
UserMeta represents minimal user information for the token owner.
object
id

The unique identifier of the user

integer format: int64
login

The username of the user

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