Learn how to integrate our generation and analysis services into your applications.
All requests require a valid API key in the header:
100 requests per minute per API key
Generate secure passwords and passphrases
https://motdepasse.app/api/generate-password
The Password Generation Service provides a flexible solution for creating secure passwords or memorable passphrases. It offers numerous customization options and includes an evaluation of the generated password's strength.
Base URL: https://motdepasse.app/api/generate-password
Method: POST
Auth Required: Yes (API Key in header)
Data Format: JSON
All requests must include a valid API key in the headers.
X-API-KEY: your-api-key
{
"length": number,
"includeUppercase": boolean,
"includeLowercase": boolean,
"includeNumbers": boolean,
"includeSymbols": boolean,
"usePassphrase": boolean,
"wordCount": number,
"wordSeparator": string
}
length
: Password length
includeUppercase
: Include uppercase letters (A-Z)
includeLowercase
: Include lowercase letters (a-z)
includeNumbers
: Include numbers (0-9)
includeSymbols
: Include special characters (!@#$%^&*()_+-=[]{}|;:,.<>?)
usePassphrase
: Use passphrase mode
wordCount
: Number of words in the passphrase
wordSeparator
: Separator between words
{
"password": "xK9#mP2$vL5nQ8",
"strength": "strong"
}
{
"password": "Correct-Horse-Battery-Staple-42!",
"strength": "veryStrong"
}
The strength
field can have the following values:
"weak"
: Low strength"medium"
: Medium strength"strong"
: High strength"veryStrong"
: Very high strength{
"error": "Invalid length (4-64)"
}
{
"error": "Invalid word count (2-10)"
}
{
"error": "Invalid or missing API key"
}
{
"error": "Method Not Allowed"
}
Strength is calculated according to the following criteria:
Weak if:
Medium if:
Strong if:
Very Strong if:
Strength is calculated according to the following criteria:
Weak if:
Medium if:
Strong if:
Very Strong if:
const request = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-KEY': 'your-api-key'
},
body: JSON.stringify({
length: 16,
includeUppercase: true,
includeLowercase: true,
includeNumbers: true,
includeSymbols: true
})
};
fetch('https://motdepasse.app/api/generate-password', request)
.then(response => response.json())
.then(data => console.log(data));
const request = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-KEY': 'your-api-key'
},
body: JSON.stringify({
usePassphrase: true,
wordCount: 4,
wordSeparator: "-",
includeNumbers: true,
includeSymbols: true
})
};
fetch('https://motdepasse.app/api/generate-password', request)
.then(response => response.json())
.then(data => console.log(data));
Mode Selection
Recommended Length
Composition
Security
Usage
Performance
If you find our tool useful, you can support our future developments with a cryptocurrency donation: