---
title: "List tokens"
method: GET
path: "/api/users/service/{userId}/personal-access-tokens"
tags: ["Personal access token"]
---

# List tokens

`GET /api/users/service/{userId}/personal-access-tokens`

Retrieve all personal access tokens for the authenticated user or a specified service user.

## Path parameters

- `userId` string, uuid, nullable, required

## Response `200`

List of personal access tokens

- object[] — List of personal access tokens
  - `id` string, uuid, required — Unique identifier of the personal access token
  - `note` string, required — Description or note for the token
  - `permissions` string[], required — List of permissions granted to this token
  - `allProjects` boolean, required — Whether the token has access to all projects
  - `projects` object[], required — List of projects the token has access to
    - `id` string, uuid, required — Unique identifier of the project
    - `name` string, required — Name of the project
    - `key` string — Project key
    - `organisationId` string, uuid, required — Organisation ID the project belongs to
    - `version` string, required — Project version
    - `createdAt` string, required — Timestamp when the project was created
    - `updatedAt` string, required — Timestamp when the project was last updated
    - `protected` boolean — Whether the project is protected
  - `user` object, required — User who owns the token
    - `id` string, uuid, required — Unique identifier of the user
    - `email` string, email, required — Email address of the user
    - `firstName` string, nullable — First name of the user
    - `lastName` string, nullable — Last name of the user
    - `type` string, required — User type (e.g., member, admin, owner)
    - `status` string, required — User status (e.g., active, disabled)
    - `isService` boolean — Whether the user is a service account
    - `createdAt` string, required — Timestamp when the user was created
    - `updatedAt` string, required — Timestamp when the user was last updated
  - `createdAt` string, required — Timestamp when the token was created
  - `updatedAt` string, required — Timestamp when the token was last updated
  - `expiresAt` string, nullable — Timestamp when the token expires, null if indefinite

---

[API](https://skmtc.dev/gorules/apis/gorules-agent-api.md) · [All operations](https://skmtc.dev/gorules/apis/gorules-agent-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gorules/gorules-agent-api/revisions/52c0773fcd80/schema)
