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

# Square OAuth application secret (`square_oauth_secret`)

> **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.

Application secret of a Square developer application, which the application uses to exchange OAuth authorization codes for access tokens. It starts with sq0csp- followed by 43 characters. It is a different credential from a Square access token. Examples are left out because GitHub push protection rejects token-shaped values, even constructed ones.

- Parent datatype: `api_key`
- 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`):

```
^sq0csp-[A-Za-z0-9_-]{43}$
```

## Examples

- `sq0csp-ExampleSecretTooShort` (invalid example) — Too short

## Supported by tools

- `detectsecrets`
- `semgrep`
- `trufflehog`

## Sources

- other: <https://github.com/Yelp/detect-secrets/blob/master/detect_secrets/plugins/square_oauth.py>

## Quality

Score 63/100. Missing: examples, authoritative source link, mapping (Wikidata, Schema.org, ...), translation.

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