aldinokemal/sdk-php-whatsapp-web-multidevice

This API is used for sending whatsapp via API

dev-main 2025-04-19 12:28 UTC

This package is not auto-updated.

Last update: 2025-05-18 04:03:13 UTC


README

This API is used for sending whatsapp via API

Installation & Usage

Requirements

PHP 8.1 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/aldinokemal/sdk-php-whatsapp-web-multidevice.git"
    }
  ],
  "require": {
    "aldinokemal/sdk-php-whatsapp-web-multidevice": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/SdkWhatsappWebMultiDevice/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure HTTP basic authorization: basicAuth
$config = SdkWhatsappWebMultiDevice\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new SdkWhatsappWebMultiDevice\Api\AppApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->appDevices();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AppApi->appDevices: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to http://localhost:3000

Class Method HTTP request Description
AppApi appDevices GET /app/devices Get list connected devices
AppApi appLogin GET /app/login Login to whatsapp server
AppApi appLoginWithCode GET /app/login-with-code Login with pairing code
AppApi appLogout GET /app/logout Remove database and logout
AppApi appReconnect GET /app/reconnect Reconnecting to whatsapp server
GroupApi addParticipantToGroup POST /group/participants Adding more participants to group
GroupApi approveGroupParticipantRequest POST /group/participant-requests/approve Approve participant request to join group
GroupApi createGroup POST /group Create group and add participant
GroupApi demoteParticipantToMember POST /group/participants/demote Demote participants to member
GroupApi getGroupParticipantRequests GET /group/participant-requests Get list of participant requests to join group
GroupApi joinGroupWithLink POST /group/join-with-link Join group with link
GroupApi leaveGroup POST /group/leave Leave group
GroupApi promoteParticipantToAdmin POST /group/participants/promote Promote participants to admin
GroupApi rejectGroupParticipantRequest POST /group/participant-requests/reject Reject participant request to join group
GroupApi removeParticipantFromGroup POST /group/participants/remove Remove participants from group
MessageApi deleteMessage POST /message/{message_id}/delete Delete Message
MessageApi reactMessage POST /message/{message_id}/reaction Send reaction to message
MessageApi readMessage POST /message/{message_id}/read Mark as read message
MessageApi revokeMessage POST /message/{message_id}/revoke Revoke Message
MessageApi updateMessage POST /message/{message_id}/update Edit message by message ID before 15 minutes
NewsletterApi unfollowNewsletter POST /newsletter/unfollow Unfollow newsletter
SendApi sendAudio POST /send/audio Send Audio
SendApi sendContact POST /send/contact Send Contact
SendApi sendFile POST /send/file Send File
SendApi sendImage POST /send/image Send Image
SendApi sendLink POST /send/link Send Link
SendApi sendLocation POST /send/location Send Location
SendApi sendMessage POST /send/message Send Message
SendApi sendPoll POST /send/poll Send Poll / Vote
SendApi sendPresence POST /send/presence Send presence status
SendApi sendVideo POST /send/video Send Video
UserApi userAvatar GET /user/avatar User Avatar
UserApi userChangeAvatar POST /user/avatar User Change Avatar
UserApi userChangePushName POST /user/pushname User Change Push Name
UserApi userInfo GET /user/info User Info
UserApi userMyContacts GET /user/my/contacts Get list of user contacts
UserApi userMyGroups GET /user/my/groups User My List Groups
UserApi userMyNewsletter GET /user/my/newsletters User My List Groups
UserApi userMyPrivacy GET /user/my/privacy User My Privacy Setting

Models

Authorization

Authentication schemes defined for the API:

basicAuth

  • Type: HTTP basic authentication

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 5.4.0
    • Generator version: 7.13.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen