AuthTool Documentation

website·Indexed 31 days ago

https://docs.authtool.app/

API documentation for AuthTool, featuring a Public API for automated key management (creation, deletion, resetting, and status changes) and a Client API for mobile application integration. Includes implementation examples for iOS (Swift, Objective-C) and Android (Java), focusing on AES encryption and secure credential protection.

Tokens
23.4K
Snippets
65
Records
78
Agent score
48%

What's inside AuthTool

  1. Overview of Absolute Security authentication features

    Absolute Security provides a high-performance authentication system designed for cross-platform security and scalability. Key capabilities include:

    • Security: Uses modern encryption algorithms to protect user credentials across all supported platforms.
    • Performance: Optimized to handle thousands of authentication requests per second with ultra-low latency.
    • Integration: Provides dedicated SDKs and documentation for Android, iOS, Windows, and popular Web platforms.
  2. Overview of Absolute Security authentication features

    Absolute Security provides a high-performance authentication system featuring modern encryption algorithms to protect user credentials across all platforms. The system is optimized to handle thousands of authentication requests per second with ultra-low latency and provides SDKs for Android, iOS, Windows, and popular Web platforms.
  3. Retrieve key details and activated devices

    Use the GET /public/v1/key/{key}/detail endpoint to fetch detailed information about a specific key and a list of all devices that have activated it. This API only returns information for keys belonging to your account. The isExpired field indicates the current status based on server time, and the status field for devices indicates if they are active (1) or inactive/revoked (0).
    # Example Request
    curl -X GET "https://api.authtool.app/public/v1/key/KEY1-XXXX-XXXX-XXXX/detail" \
         -H "X-API-Key: YOUR_API_KEY"
  4. Retrieve license key details and activated devices

    Use the GET /public/v1/key/{key}/detail endpoint to get detailed information about a specific key and a list of all devices that have ever been activated with it. This API only returns information for keys belonging to the authenticated account.

    Request Requirements:

    • Method: GET
    • Path Parameter: key (string, required) - The key code to retrieve details for.
    • Header: X-API-Key - Your account API key.

    Response Fields:

    • Key Object:
      • activateCount (number): Number of times activated.
      • activateLimit (number): Maximum allowed activation count.
      • unit (string): Time unit (hour, day, week, month, year).
      • duration (number): Validity duration.
      • expiredAt (string): Key expiration date (ISO 8601).
      • isExpired (boolean): Whether the key has expired based on server time.
    • Device Object (Array):
      • uid (string): Unique identifier of the device.
      • expireAt (string): Activation expiration date (ISO 8601).
      • activeAt (string): Activation date (ISO 8601).
      • isExpired (boolean): Whether the activation has expired.
      • status (number): Activation status (1 = active, 0 = inactive/revoked).

    Error Codes:

    • 401 Unauthorized: Invalid API key.
    • 403 Forbidden: No permission to access this specific key.
    • 404 Not Found: Key not found.
    curl -X GET "https://api.authtool.app/public/v1/key/KEY1-XXXX-XXXX-XXXX/detail" \
         -H "X-API-Key: YOUR_API_KEY"
  5. Set up Authtool Client API for mobile integration

    To integrate the Authtool Client API into a mobile application, follow these two primary setup steps: first, obtain the package token and create an AES key from the package list page; second, implement AES encryption within the mobile application to secure communications.
  6. Example: Retrieve key details using PHP cURL

    This example demonstrates how to call the Key Detail API using PHP cURL, handle the HTTP response, and parse the JSON data to display key and device information.
    <?php
    
    $apiKey = 'YOUR_API_KEY';
    $keyToCheck = 'KEY1-XXXX-XXXX-XXXX'; // Replace with actual key
    $url = 'https://api.authtool.app/public/v1/key/' . $keyToCheck . '/detail';
    
    $curl = curl_init();
    
    curl_setopt_array($curl, [
        CURLOPT_URL => $url,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => '',
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 0,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => 'GET',
        CURLOPT_HTTPHEADER => [
            'X-API-Key: ' . $apiKey
        ],
    ]);
    
    $response = curl_exec($curl);
    $httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
    
    curl_close($curl);
    
    $result = json_decode($response, true);
    if ($httpCode === 200) {
        $key = $result['key'];
        $devices = $result['devices'];
    
        echo "Activate Count: " . $key['activateCount'] . "/" . $key['activateLimit'] . "\n";
        echo "Duration: " . $key['duration'] . " " . $key['unit'] . "\n";
    
        foreach ($devices as $device) {
            echo "Device ID: " . $device['uid'] . " Status: " . ($device['status'] ? 'Active' : 'Inactive') . "\n";
        }
    } else {
        echo "Error: " . ($result['message'] ?? 'Unknown error') . "\n";
    }
    ?>
  7. Set up Authtool Client API for mobile integration

    To integrate the Authtool Client API into a mobile application, follow these two prerequisite steps: first, obtain the package token and generate an AES key from the package list page; second, implement AES encryption within the mobile application to secure communications.
  8. Security requirements for AuthTool mobile integration

    To ensure the security of the integration, follow these constraints:

    1. Data Encryption: All data sent to and received from the API must be encrypted.
    2. AES Key: Use the AES key provided by the server during package setup for encryption/decryption.
    3. Package Token: Store the package token securely; do not hardcode it in a way that it can be easily exposed.
    4. Device UID: Use a consistent unique identifier (UDID) for the device to avoid unnecessary key resets.
  9. Security requirements for AuthTool mobile integration

    To ensure the security of the integration, follow these constraints:

    1. Package Token: Store securely; do not expose it in the source code.
    2. AES Key: Use the key received from the server during package setup.
    3. Device UID: Use a consistent unique identifier to avoid unnecessary key resets.
    4. Encryption: All data transmitted to and from the API must be encrypted.
  10. Generate Device UID for Authtool Integration

    To uniquely identify a device for the Authtool API, use the following platform-specific recommendations:

    • Android: Use Settings.Secure.ANDROID_ID or generate a UUID and store it in SharedPreferences.
    • iOS: Use the device UDID or a library that supports persistent UID storage.