### cURL Examples for Password Generation Source: https://dinopass.com/api Examples demonstrating how to generate single, bulk, and custom passwords using cURL, with options for text or JSON format. ```bash # Single password (text format) curl https://www.dinopass.com/password/simple # Single password (JSON format) curl "https://www.dinopass.com/password/simple?format=json" # Bulk passwords (100, JSON format) curl "https://www.dinopass.com/password/simple?n=100&format=json" # Custom password (JSON format) curl "https://www.dinopass.com/password/custom?length=16&useSymbols=true&useCapitals=true&format=json" ``` -------------------------------- ### Python Requests Examples Source: https://dinopass.com/api Python examples using the 'requests' library to fetch single and bulk passwords in both text and JSON formats, including checking rate limit headers. ```python import requests import json # Single password (text format) response = requests.get('https://www.dinopass.com/password/simple') print(response.text) # Single password (JSON format) response = requests.get('https://www.dinopass.com/password/simple?format=json') data = response.json() print(f"Password: {data['passwords'][0]}") print(f"Type: {data['type']}") # Bulk passwords (JSON format) response = requests.get('https://www.dinopass.com/password/simple?n=100&format=json') data = response.json() print(f"Generated {data['count']} passwords") print(f"Type: {data['type']}") # Check rate limit headers if response.status_code == 200: print(f"Remaining: {response.headers.get('X-RateLimit-Remaining')}") print(f"Reset at: {response.headers.get('X-RateLimit-Reset')}") ``` -------------------------------- ### PowerShell Examples for Password Generation Source: https://dinopass.com/api Demonstrates generating single and bulk passwords using PowerShell's Invoke-RestMethod. ```powershell # Single password Invoke-RestMethod -Uri "https://www.dinopass.com/password/simple" # Bulk passwords (100) $passwords = (Invoke-RestMethod -Uri "https://www.dinopass.com/password/simple?n=100") -split "`n" $passwords.Count # Should be 100 ``` -------------------------------- ### JavaScript Fetch API Examples Source: https://dinopass.com/api Examples using the Fetch API in JavaScript to generate single and bulk passwords, handling both text and JSON responses, including rate limit checks. ```javascript // Single password (text format) fetch('https://www.dinopass.com/password/simple') .then(response => response.text()) .then(password => console.log(password)); // Single password (JSON format) fetch('https://www.dinopass.com/password/simple?format=json') .then(response => response.json()) .then(data => { console.log('Password:', data.passwords[0]); console.log('Type:', data.type); }); // Bulk passwords with JSON format fetch('https://www.dinopass.com/password/simple?n=100&format=json') .then(response => { if (response.status === 429) { const retryAfter = response.headers.get('Retry-After'); console.error(`Rate limited. Retry after ${retryAfter} seconds`); return; } return response.json(); }) .then(data => { if (data) { console.log(`Generated ${data.count} passwords of type ${data.type}`); console.log('Passwords:', data.passwords); } }); ``` -------------------------------- ### JSON Response Format Example Source: https://dinopass.com/api Endpoints support JSON responses by adding '?format=json' to the URL. The response includes a 'passwords' array, 'count', and 'type'. ```json { "passwords": ["happycat42", "bravedog78"], "count": 2, "type": "simple" } ``` -------------------------------- ### Rate Limit Response Example (429) Source: https://dinopass.com/api When rate limited, the API returns a 429 status code with helpful headers like 'Retry-After' and 'X-RateLimit-Reset'. ```http HTTP/1.1 429 Too Many Requests X-RateLimit-Limit: 1000 X-RateLimit-Remaining: 0 X-RateLimit-Reset: 2024-01-15T14:30:00.000Z Retry-After: 1800 Rate limit exceeded. Maximum 1000 requests per hour. Try again after 2:30:00 PM ``` -------------------------------- ### GET /password/simple Source: https://dinopass.com/api Generates simple, easy-to-remember passwords in the format 'adjective + noun + 2-digit number'. Supports generating multiple passwords and choosing between text or JSON format. ```APIDOC ## GET /password/simple ### Description Generates simple, easy-to-remember passwords. Format: `adjective + noun + 2-digit number` **Example:** `happycat42` ### Method GET ### Endpoint `/password/simple` ### Parameters #### Query Parameters - **n** (integer) - Optional - Number of passwords to generate. Default: 1, Maximum: 100 - **format** (string) - Optional - Response format. Options: `text` (default) or `json` ### Request Example ``` GET /password/simple GET /password/simple?n=100 GET /password/simple?format=json GET /password/simple?n=5&format=json ``` ### Response #### Success Response (200) - **passwords** (array of strings) - List of generated passwords (for JSON format) - **count** (integer) - Number of passwords generated (for JSON format) - **type** (string) - Type of password generated (for JSON format) #### Response Example (Text Format - Default) ``` happycat42 bravedog78 cleverbird91 ``` #### Response Example (JSON Format) ```json { "passwords": [ "happycat42", "bravedog78", "cleverbird91" ], "count": 3, "type": "simple" } ``` ``` -------------------------------- ### GET /password/strong Source: https://dinopass.com/api Generates stronger passwords with varied capitalization, leet speak substitutions, separators, and flexible number placement. Supports generating multiple passwords and choosing between text or JSON format. ```APIDOC ## GET /password/strong ### Description Generates stronger passwords with varied capitalization, leet speak substitutions, separators, and flexible number placement for enhanced security. **Example:** `Br@v3D0g-42` ### Method GET ### Endpoint `/password/strong` ### Parameters #### Query Parameters - **n** (integer) - Optional - Number of passwords to generate. Default: 1, Maximum: 10 - **format** (string) - Optional - Response format. Options: `text` (default) or `json` ### Request Example ``` GET /password/strong GET /password/strong?n=10 GET /password/strong?format=json ``` ### Response #### Success Response (200) - **passwords** (array of strings) - List of generated passwords (for JSON format) - **count** (integer) - Number of passwords generated (for JSON format) - **type** (string) - Type of password generated (for JSON format) #### Response Example (Text Format - Default) ``` Cl3v3rB1rd-99 42@ngryL10n W1s3W0lf7 ``` #### Response Example (JSON Format) ```json { "passwords": [ "Cl3v3rB1rd-99", "42@ngryL10n", "W1s3W0lf7" ], "count": 3, "type": "strong" } ``` ``` -------------------------------- ### GET /password/custom Source: https://dinopass.com/api Generates customizable passwords with configurable length, character sets, and complexity options. Supports generating multiple passwords and choosing between text or JSON format. ```APIDOC ## GET /password/custom ### Description Generates customizable passwords with configurable length, character sets, and complexity options. ### Method GET ### Endpoint `/password/custom` ### Parameters #### Query Parameters - **length** (integer) - Optional - Password length. Default: 12, Range: 7-20 - **useNumbers** (boolean) - Optional - Include digits 0-9. Default: `true` - **useSymbols** (boolean) - Optional - Include special characters (!@#$%^&+). Default: `false` - **useCapitals** (boolean) - Optional - Include uppercase letters A-Z. Default: `false` - **n** (integer) - Optional - Number of passwords to generate. Default: 1, Maximum: 100 - **format** (string) - Optional - Response format. Options: `text` (default) or `json` ### Request Example ``` GET /password/custom GET /password/custom?length=16&useSymbols=true&useCapitals=true GET /password/custom?length=20&useNumbers=false&useSymbols=true GET /password/custom?length=16&useSymbols=true&useCapitals=false&n=5&format=json ``` ### Response #### Success Response (200) - **passwords** (array of strings) - List of generated passwords (for JSON format) - **count** (integer) - Number of passwords generated (for JSON format) - **type** (string) - Type of password generated (for JSON format) #### Response Example (Text Format - Default) ``` happycat42@xyz bravedog78!abc ``` #### Response Example (JSON Format) ```json { "passwords": [ "happycat42@xyz", "bravedog78!abc" ], "count": 2, "type": "custom" } ``` ``` -------------------------------- ### GET /hasword Source: https://dinopass.com/api Checks if a word exists in the DinoPass word database (adjectives or nouns). Returns a boolean indicating existence, with support for text or JSON format. ```APIDOC ## GET /hasword ### Description Checks if a word exists in the DinoPass word database (adjectives or nouns). ### Method GET ### Endpoint `/hasword` ### Parameters #### Query Parameters - **word** (string) - Required - The word to check - **format** (string) - Optional - Response format. Options: `text` (default) or `json` ### Request Example ``` GET /hasword?word=happy GET /hasword?word=happy&format=json ``` ### Response #### Success Response (200) - **exists** (boolean) - `true` if the word exists, `false` otherwise (for JSON format) - **word** (string) - The word that was checked (for JSON format) #### Response Example (Text Format - Default) ``` true ``` Returns `true` if the word exists, `false` otherwise. #### Response Example (JSON Format) ```json { "word": "happy", "exists": true } ``` ``` -------------------------------- ### Response Formats Source: https://dinopass.com/api All endpoints support two response formats: text (default) and JSON. Use the `format` query parameter to specify your preferred format. ```APIDOC ## Response Formats All endpoints support two response formats: **text** (default) and **JSON**. Use the `format` query parameter to specify your preferred format. ### Text Format (Default) - **Content-Type:** `text/plain` - **Encoding:** UTF-8 - **Format:** One password per line (when using bulk operations) - **Example:** ``` happycat42 nbravedog78 ``` ### JSON Format - **Content-Type:** `application/json` - **Encoding:** UTF-8 - **Structure:** Object with `passwords` array, `count`, and `type` fields - **Example:** ```json { "passwords": ["happycat42", "bravedog78"], "count": 2, "type": "simple" } ``` **Usage:** Add `?format=json` to any endpoint URL to receive JSON responses. ``` -------------------------------- ### Generate Bulk Simple Passwords Source: https://dinopass.com/api Use the 'n' parameter to generate multiple passwords in a single API request. This is efficient for bulk operations and counts as one request towards your rate limit. Note the specific limits per endpoint. ```bash GET /password/simple?n=100 GET /password/simple?n=100 ``` -------------------------------- ### Generate Simple Passwords Source: https://dinopass.com/api Generates simple passwords in 'adjective + noun + 2-digit number' format. Supports generating multiple passwords and JSON output. ```http GET /password/simple ``` ```http GET /password/simple?n=100 ``` ```http GET /password/simple?format=json ``` ```http GET /password/simple?n=5&format=json ``` -------------------------------- ### Generate Strong Passwords Source: https://dinopass.com/api Generates stronger passwords with varied capitalization, leet speak, separators, and flexible number placement. Supports multiple passwords and JSON output. ```http GET /password/strong ``` ```http GET /password/strong?n=10 ``` ```http GET /password/strong?format=json ``` -------------------------------- ### Generate Custom Passwords Source: https://dinopass.com/api Generates customizable passwords with configurable length, character sets, and complexity. Supports multiple passwords and JSON output. ```http GET /password/custom ``` ```http GET /password/custom?length=16&useSymbols=true&useCapitals=true ``` ```http GET /password/custom?length=20&useNumbers=false&useSymbols=true ``` ```http GET /password/custom?length=16&useSymbols=true&useCapitals=false&n=5&format=json ``` -------------------------------- ### Word Existence JSON Response Source: https://dinopass.com/api JSON response for word existence check, indicating if the word exists. ```json { "word": "happy", "exists": true } ``` -------------------------------- ### Simple Password JSON Response Source: https://dinopass.com/api JSON response for simple password generation, containing a list of passwords. ```json { "passwords": [ "happycat42", "bravedog78", "cleverbird91" ], "count": 3, "type": "simple" } ``` -------------------------------- ### Status Codes and Error Handling Source: https://dinopass.com/api Information on successful status codes and how rate limiting errors are handled. ```APIDOC ## Status Codes - `200 OK` - Success - `429 Too Many Requests` - Rate limit exceeded - `500 Internal Server Error` - Server error ## Error Handling When rate limited (429), the response includes helpful headers and a message: **Rate Limit Response (429):** ```http HTTP/1.1 429 Too Many Requests X-RateLimit-Limit: 1000 X-RateLimit-Remaining: 0 X-RateLimit-Reset: 2024-01-15T14:30:00.000Z Retry-After: 1800 Rate limit exceeded. Maximum 1000 requests per hour. Try again after 2:30:00 PM ``` ``` -------------------------------- ### Simple Password Text Response Source: https://dinopass.com/api Default text response for simple password generation, with one password per line. ```text happycat42 bravedog78 cleverbird91 ``` -------------------------------- ### Custom Password Text Response Source: https://dinopass.com/api Default text response for custom password generation, with one password per line. ```text happycat42@xyz bravedog78!abc ``` -------------------------------- ### Custom Password JSON Response Source: https://dinopass.com/api JSON response for custom password generation, containing a list of passwords. ```json { "passwords": [ "happycat42@xyz", "bravedog78!abc" ], "count": 2, "type": "custom" } ``` -------------------------------- ### Strong Password JSON Response Source: https://dinopass.com/api JSON response for strong password generation, containing a list of passwords. ```json { "passwords": [ "Cl3v3rB1rd-99", "42@ngryL10n", "W1s3W0lf7" ], "count": 3, "type": "strong" } ``` -------------------------------- ### Word Existence Text Response Source: https://dinopass.com/api Default text response for word existence check, returning 'true' or 'false'. ```text true ``` -------------------------------- ### Password Generation Endpoints Source: https://dinopass.com/api The DinoPass API provides endpoints for generating different types of passwords. All endpoints support bulk generation using the 'n' parameter and can return responses in text or JSON format. ```APIDOC ## GET /password/simple ### Description Generates simple passwords. ### Method GET ### Endpoint /password/simple ### Query Parameters - **n** (integer) - Optional - Number of simple passwords to generate (up to 100 per request). - **format** (string) - Optional - Response format. Can be 'text' (default) or 'json'. ### Response #### Success Response (200) - **text/plain** (string) - A list of simple passwords, one per line (default format). - **application/json** (object) - An object containing a 'passwords' array, 'count', and 'type' (when format=json). - **passwords** (array) - Array of generated simple passwords. - **count** (integer) - The number of passwords generated. - **type** (string) - The type of password generated ('simple'). ### Request Example ``` GET /password/simple?n=100&format=json ``` ### Response Example (JSON) ```json { "passwords": ["happycat42", "bravedog78"], "count": 2, "type": "simple" } ``` ``` ```APIDOC ## GET /password/strong ### Description Generates strong passwords. ### Method GET ### Endpoint /password/strong ### Query Parameters - **n** (integer) - Optional - Number of strong passwords to generate (up to 10 per request). - **format** (string) - Optional - Response format. Can be 'text' (default) or 'json'. ### Response #### Success Response (200) - **text/plain** (string) - A list of strong passwords, one per line (default format). - **application/json** (object) - An object containing a 'passwords' array, 'count', and 'type' (when format=json). - **passwords** (array) - Array of generated strong passwords. - **count** (integer) - The number of passwords generated. - **type** (string) - The type of password generated ('strong'). ### Request Example ``` GET /password/strong?n=10&format=json ``` ### Response Example (JSON) ```json { "passwords": ["Str0ngP@sswOrd1", "An0th3rS3cur3P@ss"], "count": 2, "type": "strong" } ``` ``` ```APIDOC ## GET /password/custom ### Description Generates custom passwords based on specified criteria. ### Method GET ### Endpoint /password/custom ### Query Parameters - **length** (integer) - Optional - The desired length of the password (default is 12). - **useSymbols** (boolean) - Optional - Whether to include symbols in the password (default is false). - **useCapitals** (boolean) - Optional - Whether to include capital letters in the password (default is false). - **n** (integer) - Optional - Number of custom passwords to generate (up to 100 per request). - **format** (string) - Optional - Response format. Can be 'text' (default) or 'json'. ### Response #### Success Response (200) - **text/plain** (string) - A list of custom passwords, one per line (default format). - **application/json** (object) - An object containing a 'passwords' array, 'count', and 'type' (when format=json). - **passwords** (array) - Array of generated custom passwords. - **count** (integer) - The number of passwords generated. - **type** (string) - The type of password generated ('custom'). ### Request Example ``` GET /password/custom?length=16&useSymbols=true&useCapitals=true&n=50&format=json ``` ### Response Example (JSON) ```json { "passwords": ["C@stle!987", "D@ta$ecure123"], "count": 2, "type": "custom" } ``` ``` -------------------------------- ### Check Word Existence Source: https://dinopass.com/api Checks if a word exists in the DinoPass word database. Supports JSON output. ```http GET /hasword?word=happy ``` ```http GET /hasword?word=happy&format=json ``` -------------------------------- ### Strong Password Text Response Source: https://dinopass.com/api Default text response for strong password generation, with one password per line. ```text Cl3v3rB1rd-99 42@ngryL10n W1s3W0lf7 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.