承接 aldinokemal/sdk-php-whatsapp-web-multidevice 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

aldinokemal/sdk-php-whatsapp-web-multidevice

Composer 安装命令:

composer require aldinokemal/sdk-php-whatsapp-web-multidevice

包简介

This API is used for sending whatsapp via API. Device scoping: - Send `X-Device-Id` on all device-scoped REST calls. - WebSocket: connect to `/ws?device_id=<id>`.

README 文档

README

This API is used for sending whatsapp via API.

Device scoping:

  • Send X-Device-Id on all device-scoped REST calls.
  • WebSocket: connect to /ws?device_id=<id>.

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
AppApi appStatus GET /app/status Get connection status
ChatApi archiveChat POST /chat/{chat_jid}/archive Archive or unarchive a chat
ChatApi getChatMessages GET /chat/{chat_jid}/messages Get messages from a specific chat
ChatApi labelChat POST /chat/{chat_jid}/label Label or unlabel a chat
ChatApi listChats GET /chats Get list of chats
ChatApi pinChat POST /chat/{chat_jid}/pin Pin or unpin a chat
ChatApi setDisappearingTimer POST /chat/{chat_jid}/disappearing Set disappearing messages timer
ChatwootApi chatwootSyncHistory POST /chatwoot/sync Sync message history to Chatwoot
ChatwootApi chatwootSyncStatus GET /chatwoot/sync/status Get Chatwoot sync progress
ChatwootApi chatwootWebhook POST /chatwoot/webhook Chatwoot webhook endpoint
DeviceApi addDevice POST /devices Add a new device
DeviceApi getDevice GET /devices/{device_id} Get device info
DeviceApi getDeviceStatus GET /devices/{device_id}/status Get device connection status
DeviceApi listDevices GET /devices List all devices
DeviceApi loginDevice GET /devices/{device_id}/login Login device with QR code
DeviceApi loginDeviceWithCode POST /devices/{device_id}/login/code Login device with pairing code
DeviceApi logoutDevice POST /devices/{device_id}/logout Logout device
DeviceApi reconnectDevice POST /devices/{device_id}/reconnect Reconnect device
DeviceApi removeDevice DELETE /devices/{device_id} Remove a device
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 exportGroupParticipants GET /group/participants/export Export group participants as CSV
GroupApi getGroupInfoFromLink GET /group/info-from-link Get group information from invitation link
GroupApi getGroupParticipantRequests GET /group/participant-requests Get list of participant requests to join group
GroupApi getGroupParticipants GET /group/participants Get list of participants in a group
GroupApi groupInfo GET /group/info Group Info
GroupApi groupInviteLink GET /group/invite-link Group Invite Link
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
GroupApi setGroupAnnounce POST /group/announce Set group announce mode
GroupApi setGroupLocked POST /group/locked Set group locked status
GroupApi setGroupName POST /group/name Set group name
GroupApi setGroupPhoto POST /group/photo Set group photo
GroupApi setGroupTopic POST /group/topic Set group topic
MessageApi deleteMessage POST /message/{message_id}/delete Delete Message
MessageApi downloadMessageMedia GET /message/{message_id}/download Download media from 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 starMessage POST /message/{message_id}/star Star message
MessageApi unstarMessage POST /message/{message_id}/unstar Unstar 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 sendChatPresence POST /send/chat-presence Send chat presence (typing indicator)
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 sendSticker POST /send/sticker Send Sticker
SendApi sendVideo POST /send/video Send Video
UserApi userAvatar GET /user/avatar User Avatar
UserApi userBusinessProfile GET /user/business-profile Get Business Profile Information
UserApi userChangeAvatar POST /user/avatar User Change Avatar
UserApi userChangePushName POST /user/pushname User Change Push Name
UserApi userCheck GET /user/check Check if user is on WhatsApp
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: 8.3.0
    • Generator version: 7.22.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

aldinokemal/sdk-php-whatsapp-web-multidevice 适用场景与选型建议

aldinokemal/sdk-php-whatsapp-web-multidevice 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 53 次下载、GitHub Stars 达 13, 最近一次更新时间为 2024 年 09 月 07 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「rest」 「api」 「sdk」 「openapi」 「openapitools」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 aldinokemal/sdk-php-whatsapp-web-multidevice 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 aldinokemal/sdk-php-whatsapp-web-multidevice 我们能提供哪些服务?
定制开发 / 二次开发

基于 aldinokemal/sdk-php-whatsapp-web-multidevice 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 53
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 13
  • 点击次数: 29
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 13
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: unlicense
  • 更新时间: 2024-09-07