---
title: "index"
method: GET
path: "/api/v1/repos/{user_id}/{repo}/master_tokens"
tags: ["master_tokens"]
---

# index

`GET /api/v1/repos/{user_id}/{repo}/master_tokens`

List master tokens for a repo.

**Example request:**

```
curl https://packagecloud.io/api/v1/repos/username/reponame/master_tokens
```

## Path parameters

- `user_id` string, required
- `repo` string, required

## Response `200`

Array<MasterToken> An array of master token objects that belong to this repository.

- MasterToken[]
  - `name` string — The name of the master token.
  - `value` string — The value of the master token, for use in the read token API.
  - `read_tokens` object[] — An array of {ReadToken} objects that belong to this master token.
    - `value` string
    - `name` string
  - `paths` object
    - `self` string — A URI for this master token. Can be used to destroy one.

---

[API](https://skmtc.net/cstrahan/apis/packagecloud-api.md) · [All operations](https://skmtc.net/cstrahan/apis/packagecloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cstrahan/packagecloud-api/versions/9744ac4cffc2/schema)
