Nano ID Generator
The nanoid type
will return a nano id of a specified length.
This type requires an additional element length
to be set, which will set the length of the generated nano id.
Optionally, you can also specify a custom alphabet using alphabet
. This must contain between 3 and 256 symbols.
You can check the safety of your custom alphabet and ID size using Nano ID's ID collision probability calculator.
Example Input
{
"username": "Username",
"token": "Token",
"type": "nanoid",
"length": "10"
}
Example Input Using alphabet
{
"username": "Username",
"token": "Token",
"type": "nanoid",
"alphabet": "1234567890abcdef",
"length": "10"
}
Example Output
{
"id": "dJOXrc6XvD"
}