---
id: "planetscale_token"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["secrets"]
langs: ["common"]
quality: 70
url: "http://registry.apicrafter.io/datatype/planetscale_token"
---

# PlanetScale API token (`planetscale_token`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Token for the PlanetScale API and CLI: a service token starts with pscale_tkn_ and an OAuth token with pscale_oauth_. Secret scanners expect 32 to 64 letters, digits and the characters _ = . - after the prefix. Database passwords are a separate type (planetscale_password).

- Parent datatype: `access_token`
- Personal data (PII): no
- Categories: Secrets and credentials (passwords, keys, tokens) (secrets)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^pscale_(?:tkn|oauth)_[A-Za-z0-9_=.-]{32,64}$
```

## Examples

- `pscale_tkn_ExampleTokenNotReal` (invalid example) — Too short

## Supported by tools

- `gitleaks`
- `trufflehog`

## Sources

- doc: <https://planetscale.com/docs/api/service-tokens>
- other: <https://github.com/gitleaks/gitleaks/blob/master/config/gitleaks.toml>
- other: <https://github.com/trufflesecurity/trufflehog/blob/main/pkg/detectors/planetscale/planetscale.go>

## Quality

Score 70/100. Missing: examples, mapping (Wikidata, Schema.org, ...), translation.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/planetscale_token.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/secrets/planetscale_token.yaml>
