Back
Generate passwords via API
via cURL
curl --location --request GET 'https://passverbs.vercel.app/api/generate?length=32&lowercase=1&uppercase=1&numbers=1'- The above cURL request will return a password of length 14 with lowercase and uppercase characters along with numbers and symbols.
- If you do not want symbols or numbers in your password, you simply remove them from the URL like below:
- https://passverbs.vercel.app/api/generate?length=9&lowercase=1&uppercase=1
- The value
1
denotes true. Not addingsymbols
implies you do not want symbols. - Constraints to bear in mind:
length
should be between 8 and 32 including either. At least one more requirement other than length should be supplied.
Make Siri generate passwords on prompt
- To get Siri to generate passwords using Passverbs, you need to use the Shortcuts app on iOS.
- Once installed, the first step is to make the API request to Passverbs by creating a custom shortcut. This article explains how to create an API request.
- Craft your URL such that your password requirements are fulfilled.
- Once you get the response from the API using Get Contents of URL action, the next step is to store the response in a dictionary using Get Dictionary from Input action.
- The password value is stored within the key
data
in the response. So, you want to get the password from the dictionary using the Get Dictionary Value action. - Lastly, you want to copy the extracted password to your clipboard using the Copy to Clipboard action.
- To generate passwords without even a touch, you can use the same voice prompt as the name you gave to the shortcut.