Awkward names for a sign-up form's name field
const url = 'https://api.proxymail.qa/v1/variants/names?field=first_name';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.proxymail.qa/v1/variants/names?field=first_name' \ --header 'Authorization: Bearer <token>'Values for testing what a form does with a name: accept (a real person’s name: apostrophes, hyphens, accents, other scripts such as Chinese, Arabic or Thai, one letter, exactly the maximum), reject (over the maximum, empty, only spaces), store_as_text (HTML, a script tag, a SQL injection, a template expression: to be stored and shown exactly as typed, never run) and decide (digits, symbols, emoji, spaces around, a zero-width space, composed and decomposed accents, and 64, 128 and 255 characters when no maximum is given: apps differ, so note what the app did). See https://proxymail.qa/docs/unusual-names-and-passwords.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Which field the values are for.
The field’s maximum length, when it has one: adds a value exactly that long and one over it.
Responses
Section titled “Responses”The variants
object
object
What the value checks, e.g. “A hyphen”.
What to type into the field, exactly.
object
What the value checks, e.g. “A hyphen”.
What to type into the field, exactly.
object
What the value checks, e.g. “A hyphen”.
What to type into the field, exactly.
object
What the value checks, e.g. “A hyphen”.
What to type into the field, exactly.
Example generated
{ "field": "example", "max_length": 1, "accept": [ { "tests": "example", "value": "example" } ], "reject": [ { "tests": "example", "value": "example" } ], "store_as_text": [ { "tests": "example", "value": "example" } ], "decide": [ { "tests": "example", "value": "example" } ]}An error
object
Example generated
{ "error": "example", "message": "example"}