The One-Liner
curl "https://api.gadgethumans.com/password?length=32&symbols=true"
JavaScript
async function genPassword(length = 16) {
const url = `https://api.gadgethumans.com/password?length=${length}&symbols=true`;
const resp = await fetch(url);
return (await resp.json()).password;
}
Python
import requests
def gen_password(length=16, symbols=True):
resp = requests.get('https://api.gadgethumans.com/password',
params={'length': length, 'symbols': symbols})
return resp.json()['password']
print(gen_password(32))
Free - 100/day, no API key needed. api.gadgethumans.com
Top comments (0)