承接 wasolution/api-client 相关项目开发

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

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

wasolution/api-client

最新稳定版本:v1.0.0

Composer 安装命令:

composer require wasolution/api-client

包简介

A PHP client for WhatsApp Solution API using WASolution API Client

README 文档

README

Latest Version on Packagist Total Downloads MIT Licensed

A PHP client for interacting with the WhatsApp Solution API. This package provides a simple and elegant way to send WhatsApp messages through the WASolution platform.

Requirements

  • PHP 7.4 or higher
  • Guzzle HTTP Client 7.0 or higher

Installation

You can install the package via composer:

composer require wasolution/api-client

Usage

use WASolution\WAClient;

// Initialize the client with your credentials
$client = new WAClient(
    'your-app-key',    // Get this from your WASolution dashboard
    'your-auth-key'    // Get this from your WASolution dashboard
);

// Send a message
try {
    $response = $client->sendMessage(
        '60123456789',     // Recipient's phone number
        'Hello from PHP!'   // Your message
    );
    print_r($response);
} catch (\Exception $e) {
    echo "Error: " . $e->getMessage();
}

Response Format

A successful response will look like this:

{
    "message_status": "Success",
    "data": {
        "from": "601987654321",
        "to": "60123456789",
        "status_code": 200
    }
}

Error Handling

The package throws exceptions for various error cases:

  • Invalid credentials
  • Network errors
  • API errors
  • Invalid phone numbers

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. Make sure to:

  1. Follow the existing code style
  2. Add tests for any new functionality
  3. Update documentation as needed

Security

If you discover any security related issues, please email suppport@wasolution.getligeeasy.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-24