---
title: "List tokens for a provided API ID and OAuth-client ID"
method: GET
path: "/tyk/oauth/clients/{apiID}/{keyName}/tokens"
tags: ["OAuth"]
---

# List tokens for a provided API ID and OAuth-client ID

`GET /tyk/oauth/clients/{apiID}/{keyName}/tokens`

This endpoint allows you to retrieve a list of all current tokens and their expiry date for a provided API ID and OAuth-client ID .If page query parameter is sent the tokens will be paginated. This endpoint will work only for newly created tokens.
        <br/>
        <br/>
        You can control how long you want to store expired tokens in this list using `oauth_token_expired_retain_period` gateway option, which specifies retain period for expired tokens stored in Redis. By default expired token not get removed. See <a href="https://tyk.io/docs/configure/tyk-gateway-configuration-options/#a-name-oauth-token-expired-retain-period-a-oauth-token-expired-retain-period" target="_blank">here</a> for more details.

## Path parameters

- `apiID` string, required
- `keyName` string, required

## Query parameters

- `page` integer

## Response `200`

Tokens returned successfully.

- union
  - PaginatedOAuthClientTokens
    - `Pagination` PaginationStatus
      - `page_num` integer
      - `page_size` integer
      - `page_total` integer
    - `Tokens` OAuthClientToken[], nullable
      - `code` string
      - `expires` integer
  - OAuthClientToken[], nullable
    - `code` string
    - `expires` integer

## Other responses

- `403` — Forbidden
- `404` — OAuth Client ID not found
- `500` — Internal server error.

---

[API](https://skmtc.net/tyktechnologies/apis/tyk-gateway-api.md) · [All operations](https://skmtc.net/tyktechnologies/apis/tyk-gateway-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tyktechnologies/tyk-gateway-api/versions/4ae998d5545e/schema)
