Token Generation
The /token endpoint generates secure strings called tokens. This endpoint is particularly useful for creating random identifiers for various applications.
posthttps://api.moxon.dev /v5/token
Try itpost/v5/token
curl -X POST \ "https://api.moxon.dev/v5/token" \ -H "Content-Type: application/json" \ -d '{ "len": "24" }'Send the request to see the response here.
lennumberoptionalDefault:
24.Token length (12-4096). Default: 24
typestringoptionalToken type (see options below). Default:
alphanum- alpha
- alphanum
- base64
- hex
- num
- punct
- urlsafe
- uuid
| Type | Description | Example |
|---|---|---|
alpha | Letters only (a-z, A-Z) | AbCdEfGhIjKl |
alphanum | Letters and numbers | 6tMdlDV90x4S |
base64 | Base64 encoding | dGVzdDEyMzQ= |
hex | Hexadecimal digits | a1b2c3d4e5f6 |
num | Numbers only | 123456789012 |
punct | Punctuation characters | !@#$%^&*()_+ |
urlsafe | URL-safe characters | abc-123_XYZ |
uuid | UUID format | 550e8400-e29b-41d4-a716-446655440000 |
tokenstringThe generated secure token
If parameters are invalid, the API will return an error:
- 400
Invalid number.Thelenparameter is not a valid number - 400
Length cannot exceed 4096.Thelenparameter is greater than 4096 - 400
Length cannot be less than 12.Thelenparameter is less than 12
Last updated on May 25, 2026