---
title: "List access tokens for a service account"
method: GET
path: "/api/v2/service_accounts/{service_account_id}/access_tokens"
tags: ["Service Accounts"]
---

# List access tokens for a service account

`GET /api/v2/service_accounts/{service_account_id}/access_tokens`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/service_accounts/{service_account_id}/access_tokens`
- Auth: API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`

List all access tokens for a specific service account.

## Path parameters

- `service_account_id` string, required

## Query parameters

- `page[size]` integer
- `page[number]` integer
- `sort` 'name' | '-name' | 'created_at' | '-created_at' | 'expires_at' | '-expires_at' | 'last_used_at' | '-last_used_at': Sorting options
- `filter` string

## Response `200`

OK

- ListServiceAccessTokensResponse: Response for a list of access tokens.
  - `data` ServiceAccessToken[]: Array of access tokens.
    - `attributes` ServiceAccessTokenAttributes: Attributes of an access token.
      - `created_at` string, date-time: Creation date of the access token.
      - `expires_at` string, date-time, nullable: Expiration date of the access token.
      - `last_used_at` string, date-time, nullable: Date the access token was last used.
      - `modified_at` string, date-time, nullable: Date of last modification of the access token.
      - `name` string: Name of the access token.
      - `public_portion` string: The public portion of the access token.
      - `scopes` string[]: Array of scopes granted to the access token.
    - `id` string: ID of the access token.
    - `relationships` ServiceAccessTokenRelationships: Resources related to the access token.
      - `owned_by` RelationshipToServiceAccount: Relationship to service account.
        - `data` RelationshipToServiceAccountData, required: Relationship to service account object.
          - `id` string, required: A unique identifier that represents the service account.
          - `type` 'service_account', required: Service account resource type.
    - `type` 'service_access_tokens': Service access tokens resource type.
  - `meta` ServiceAccessTokenResponseMeta: Additional information related to the access token response.
    - `page` ServiceAccessTokenResponseMetaPage: Pagination information.
      - `total_filtered_count` integer: Total filtered access token count.

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/api-v2.md) - [All operations](https://skmtc.dev/datadog/apis/api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/api-v2/revisions/da68bf029e4c?raw)
