---
title: "create read token"
method: POST
path: "/install/repositories/{user_id}/{repo}/tokens.text"
tags: ["install"]
---

# create read token

`POST /install/repositories/{user_id}/{repo}/tokens.text`

## Request

- Base URL: `https://packagecloud.io`
- URL: `https://packagecloud.io/install/repositories/{user_id}/{repo}/tokens.text`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/cstrahan/apis/packagecloud-api/docs/install/repositories/:user_id/:repo/tokens.text/post.ts> (a function with typed inputs; its response is checked against the schema)

Create — or idempotently reuse — a read token for installing packages from this repository, returning the bare token value as plain text. The `name` field is a unique identifier for the consuming system; the same name always returns the same read token. Used by the npm, gem, and pip setup snippets.

## Path parameters

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

## Request body `application/x-www-form-urlencoded`

- object
  - `name` string, required: Unique identifier; the read token is created/reused under this name.

## Response `201`

The read token value (plain text).

## Changes

- **2026-06-15** `d452247d12de`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cstrahan/apis/packagecloud-api/changes/install/repositories/:user_id/:repo/tokens.text/post.md)

---

[API](https://skmtc.dev/cstrahan/apis/packagecloud-api.md) - [All operations](https://skmtc.dev/cstrahan/apis/packagecloud-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cstrahan/apis/packagecloud-api/revisions/9744ac4cffc2?raw)
