Hey there! This is a simple api for generating. It completely free. Feel free to use it. If you do, please reach out on Twitter as I would love to discuss usage and any updates you may need.
Base URL
https://api.getpassphrase.app
Generate Passphrase Endpoint
- URL:
/generate
- Method:
GET
- Description: Generate a passphrase based on provided parameters or default settings.
Examples:
Default Request: Using the
/generate
route without any query parameters will generate a passphrase with default settings.- Request:
GET https://api.getpassphrase.app/generate
- Response:
{ "status": "success", "passphrase": "apple-banana-cherry-date", "message": "Passphrase generated successfully." }
Customized Request: You can tailor the passphrase to your liking using the query parameters.
- Request:
GET https://api.getpassphrase.app/generate?totalWords=2&includeNumber=true&symbol=_&isCapital=true
- Response:
{ "status": "success", "passphrase": "Apple3_Banana", "message": "Passphrase generated successfully." }
Response Statuses
success
: The passphrase was successfully generated based on the provided criteria.error
: An issue occurred, usually due to invalid parameters. Themessage
field will provide further details.
Query Parameters:
Parameter | Type | Default | Allowed Values | Description |
---|---|---|---|---|
totalWords | Number | 4 | 1 to 10 | Specifies the number of words in the passphrase. |
symbol | String | - | - , _ , | , * , . | The symbol used to separate words. |
includeNumber | Bool | false | true , false | If true , a number will be appended to a random word. |
isCapital | Bool | false | true , false | If true , the first letter of each word will be capitalized. |
Notes:
- When using the
includeNumber=true
parameter, a random number between 0-9 is appended to a randomly chosen word in the passphrase. - While you can use multiple query parameters to customize your passphrase, if you leave them out, the defaults mentioned in the table above will apply.
Support
If you encounter any issues or have further questions, please contact me on Twitter.