The Password Generator API auto-generates random passwords that are incredibly hard to guess.
https://api.api-ninjas.com/v1/passwordgenerator
Returns a random password string adhering to the specified parameters.
length
optionalLength of password in characters. If not set, a default value of 16
is used.
exclude_numbers
optionalpremium onlyWhether to exclude numbers from the password. Must be either true
or false
. If not set, a default value of false
will be used.
exclude_special_chars
optionalpremium onlyWhether to exclude special characters(!@#$%^&*()
) from the password. Must be either true
or false
. If not set, a default value of false
will be used.
X-Api-Key
requiredAPI Key associated with your account.
https://api.api-ninjas.com/v1/passwordgenerator?length=16
Headers
X-Api-Key
Log in or sign up to get your API Key
1
2
3
{
"random_password": "nYs43u5f1oGK9*g5"
}
1
2
curl -X GET "https://api.api-ninjas.com/v1/passwordgenerator?length=12&uppercase=true&lowercase=true&numbers=true&special=true" \
-H "X-Api-Key: YOUR_API_KEY"
If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.