                                        SWAM 1.0 Readme File

                                    © Copyright 2026 KaplanSoft


    Contents:

    1. Introduction
    2. Major features
    3. System requirements
    4. Installing and Uninstalling
    5. Running
    6. Scenarios for automated tasks
    7. Release Notes
    8. Trademarks


    1. Introduction
    -----------------------------
    SWAMS - Send WhatsApp Message (Console) is a command line utility runs under Windows (Vista/7/8/10/11,
    2008-2022 Server) which sends WhatsApp messages via the Meta (Facebook) Graph API. It reads configuration
    from a `swam.ini` file (searched in the current directory and in PATH entries) and also accepts
    command-line overrides.

    2. Major features
    -----------------------------
	 1. Simple, easy to use.
	 2. Send a text message to a WhatsApp recipient using the Graph API (default API URL v22.0).
	 3. Configuration via `swam.ini` or command-line arguments.
	 4. Message preprocessing: supports `%crlf%`, `%cr%`, `%lf%`, `%tab%` tokens
            starting with `0x`.
	 5. Simple logging levels (0..3) and short timeout for API calls.
 
    3. System requirements
    ------------------------------
	 1. A Windows system with at least 2 GB of RAM.
	 2. Microsoft.NET Framework 4.7.2 (Min.)
 
   
    4. Installing and Uninstalling
    ------------------------------
    To install SWAM, create a directory; extract SWAM.zip contents to that directory.
    To uninstall SWAM, simply remove the installation directory.


    5. Configuration
    ---------------------------------

    SWAM looks for `swam.ini` in the application directory and will fall back to searching each folder
    in the system PATH. The file uses a simple INI format with the `SWAM` section. Example:

    [SWAM]
    Logging=1
    APIURL=https://graph.facebook.com/v22.0
    Token=YOUR_ACCESS_TOKEN_HERE
    PhoneID=YOUR_PHONE_ID_HERE
    PhoneNumber=15551234567
    TexttoSend=This is a test

    - `Logging`: integer 0..3 (verbosity)
    - `APIURL`: the Graph API URL (default uses v22.0)
    - `Token`: Bearer token for authorization
    - `PhoneID`: phone ID used in the Graph API endpoint
    - `PhoneNumber`: default destination phone number
    - `TexttoSend`: default message text


    6. Running
    ------------------------------

    Run SWAM from command line with the destination number and message content

         C:\SWAM>SWAM Destination_Number -[u|d|l|m]

    Options:

    - `-u <PhoneID>` : override Phone ID
    - `-d <API_URL>` : override API URL
    - `-l <0|1|2|3>` : logging level
    - `-m "Message"` : message text (Quotes required if message contains spaces)

    Examples:

    swam 15551234567 -u 000000000000000 -m "Hello from SWAM"
    
    If no command-line arguments are provided, the program prints usage information.
  
    Exit codes:

    - `0`  - Success
    - `96` - Configuration error or settings could not be loaded
    - `98` - Unhandled exception
    - `2`  - (Internal) missing or invalid parameters

    7. Release Notes
    ------------------------------

     - The application assembles a JSON POST payload for the WhatsApp API with
       `messaging_product: "whatsapp"`, `recipient_type: "individual"`, `type: "text"` and a `body`
       containing the message.
     - The app sets an HTTP Authorization header `Bearer <Token>`; keep this token secret.
     - A short timeout (~9 seconds) is used for the POST request.
     - The app prints API responses to the console when logging is enabled.


    8. Trademarks
    ------------------------------
    Microsoft, Win32, Windows 2000, Windows, and Windows NT are either registered
    trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

    KaplanSoft is the registered trademark of Kaplan Bilisim Teknolojileri Yazilim ve Ticaret Ltd.
