---
title: "get_token"
method: GET
path: "/api/v1/token.json"
tags: ["api_tokens"]
---

# get_token

`GET /api/v1/token.json`

Retrieve your API token programmatically. Authenticate with your packagecloud account email address (as the basic-auth username) and password (as the basic-auth password); be sure to URL-encode the username and password if you embed them in the URL.

**Example request:**

```
curl "https://hi%40hi.com:Asdd45VvaarT4591@packagecloud.io/api/v1/token.json"
```

## Response `200`

APIToken A JSON hash mapping the key `token` to your API token.

- APIToken
  - `token` string — Your packagecloud API token, used for HTTP basic authentication on subsequent requests.

---

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