User Generator API

Endpoint: GET /v1/user_generator/

This endpoint generates a user based on the provided query parameters such as password length, age range, gender, and domain.

Request

Authentication

To use this API, you need an API key. Here's how to obtain and use it:

  1. Obtaining the API Key:

    • Log in to https://my.sonjj.com
    • Navigate to the API section
    • You will find your unique X-Api-Key there
  2. Using the API Key:

    • Include the X-Api-Key in the header of every request
    • Header name: X-Api-Key
    • Header value: Your unique API key

Parameters

Name In Type Required Description
password_length query integer false The length of the generated password
age query string false The age range for the generated user
gender query any false The gender of the generated user
domain query any false The domain for the generated email addresses

Headers

  • X-Api-Key: Your API key (required)
  • Accept: application/json

Example Request

const headers = {
  'Accept':'application/json',
  'X-Api-Key':'YOUR_API_KEY'
};

fetch('https://app.sonjj.com/v1/user_generator/?password_length=12&age=25-35&gender=female&domain=example.com',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

Response

Success Response (200 OK)

A JSON object containing the generated user's details including:

  • Name
  • Gender
  • Date of birth
  • Fake and real addresses
  • Fake and real phone numbers
  • Email addresses (for verification, Gmail, and Outlook)
  • Username (full and short versions)
  • Password
  • Payment information (BIN number)

Example Response

{
  "name": "Jane Doe",
  "gender": "female",
  "dob": {
    "day": 15,
    "month": 7,
    "year": 1992
  },
  "address_fake": "123 Main St, Anytown, USA",
  "address_real": {
    "address1": "456 Oak Ave",
    "address2": "Apt 7B",
    "city": "Springfield",
    "state": "IL",
    "postalCode": "62701",
    "coordinates": {
      "lat": 39.781721,
      "lng": -89.650148
    }
  },
  "phone_number_fake": "+1234567890",
  "phone_number_real": "+18005551234",
  "email_for_verification": {
    "email": "jane.doe@example.com",
    "gmail": "jane.doe@gmail.com",
    "outlook": "jane.doe@outlook.com"
  },
  "email": {
    "gmail": "jane.doe@gmail.com",
    "outlook": "jane.doe@outlook.com"
  },
  "username": "janedoe1992",
  "username_short": "jdoe92",
  "password": "P@ssw0rd123!",
  "payment": {
    "bin": 411111
  }
}

Error Response (422 Unprocessable Entity)

In case of validation errors, the API will return a 422 status code with details about the error.

Notes

  • The generated user data is fictional and should not be used for any real-world applications requiring actual personal information.
  • The API key must be included in the X-Api-Key header for authentication.
  • Adjust the query parameters as needed to customize the generated user profile.