API ドキュメント
REST API を使って Passly を簡単にアプリケーションへ組み込めます
ベース URL
すべてのリクエストはこの URL から始まります。キーも登録も不要です。
120
リクエスト / 10 分
キー不要
公開 API
v1
API バージョン
…
応答時間
本番環境
https://passly.fr/api/v1エンドポイント
エンドポイントは 3 つ。展開すると、パラメーター・例・レスポンスを確認できます。
レート制限
IP アドレスごとの上限がサービスを守ります。現在の状況はヘッダーで確認できます。
IP ごとの上限
10 分あたり 120 リクエスト
レスポンスヘッダー
X-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-Reset
エラー 429
上限に達すると返されます。Retry-After ヘッダーが待機時間を示します。
エラーコード
すべてのエラーは一定の形式の JSON と、処理しやすいコードを返します。
400Bad Request
パラメーターが不正または不足しています
{
"error": true,
"message": "長さは4から128文字の間である必要があります",
"code": "invalid_length"
}429Too Many Requests
リクエストの上限を超えました
{
"error": true,
"message": "リクエスト制限に達しました。234秒お待ちください",
"retry_after": 234,
"reset_at": "2026-01-15T10:35:00.000Z"
}500Internal Server Error
サーバー内部エラー
{
"error": true,
"message": "エラーが発生しました。もう一度お試しください。"
}503Service Unavailable
メンテナンス中のサービス
{
"error": true,
"message": "サイトは現在メンテナンス中です。数分後にもう一度お試しください。"
}code フィールドで返されるコード
invalid_lengthinvalid_countinvalid_formatinvalid_wordsno_charsetempty_wordlist
統合の例
同じ呼び出しを、お好みの言語で。コピーして貼り付け、調整してください。
// PasslyClient.js
class PasslyClient {
constructor(baseURL = 'https://passly.fr/api/v1') {
this.baseURL = baseURL;
}
async generatePassword(options = {}) {
const response = await fetch(`${this.baseURL}/generate`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
length: options.length || 16,
count: options.count || 1,
lowercase: options.lowercase !== false,
uppercase: options.uppercase !== false,
digits: options.digits !== false,
special: options.special || false,
exclude_similar: options.excludeSimilar || false,
format: options.format || 'random'
})
});
if (!response.ok) {
throw new Error(`API Error: ${response.status}`);
}
return response.json();
}
async checkHealth() {
const response = await fetch(`${this.baseURL}/health`);
return response.json();
}
}
// Utilisation
const passly = new PasslyClient();
const result = await passly.generatePassword({
length: 24,
special: true,
excludeSimilar: true
});
console.log('Mot de passe:', result.data.passwords[0]);
console.log('Force:', result.data.strength);
console.log('Entropie:', result.data.entropy_bits, 'bits');