---
title: "List share tokens for a site."
method: GET
path: "/sites/{idOrSlug}/share-tokens"
tags: ["Share tokens"]
---

# List share tokens for a site.

`GET /sites/{idOrSlug}/share-tokens`

## Request

- Base URL: `https://api.stacktr.ee`
- URL: `https://api.stacktr.ee/sites/{idOrSlug}/share-tokens`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.stacktr.ee/oauth/authorize`, token URL `https://api.stacktr.ee/oauth/token`, scopes: `sites:write`, `sites:read`)

## Response `200`

OK

- object
  - `tokens` ShareToken[]
    - `id` string, required: Pass to DELETE /share-tokens/{tokenId} to revoke.
    - `label` string, nullable: Who the link is for; opens through it are attributed to this name.
    - `created_at` integer, required
    - `expires_at` integer, nullable
    - `max_uses` integer, nullable
    - `use_count` integer: Uses counted against max_uses. Not opens: a bot or link scanner fetch counts here too.
    - `revoked_at` integer, nullable
    - `opens` integer, nullable: Human opens through this link. null when the plan has no viewer numbers (metrics_locked).
    - `last_opened_at` integer, nullable
  - `metrics_locked` boolean: No viewer numbers on this plan: opens and last_opened_at are null.

---

[API](https://skmtc.dev/stacktr/apis/stacktree-api.md) · [All operations](https://skmtc.dev/stacktr/apis/stacktree-api/llms.txt) · [OpenAPI document](https://skmtc.dev/stacktr/apis/stacktree-api/revisions/5878cce46977?raw)
