sendee/sendee-php

Sendee API 的 PHP 库

1.0 2022-10-27 15:29 UTC

This package is auto-updated.

Last update: 2024-08-27 22:26:15 UTC


README

sendee-php

Latest Stable Version Quality Gate Status Total Downloads Latest Unstable Version License PHP Version Require

文档

Sendee API 的文档可以在这里找到

安装

sendee-php 作为 sendee/sendee-php 包在包管理器上可用

composer require sendee/sendee-php

快速开始

发送短信

// Send a single SMS using Sendee's REST API and PHP
<?php
$apiKey = "1|ZXXXXXX";

$client = new Sendee\SendeePhp\SendeeClient($apiKey);
$message =  $client->sendMessage(
  '+15555559410', // Text this Number
  [
    'from' => '+15555558108', // From a valid Twilio number
    'body' => 'Queue me up with Sendee'
  ]
);

print $message;

发送批量短信

// Send a multiple SMS with the same body using Sendee's REST API and PHP
<?php
$apiKey = "1|ZXXXXXX";

$client = new Sendee\SendeePhp\SendeeClient($apiKey);
$message =  $client->sendBulkMessage(
  '+15555558108', // From a valid Twilio Number
  [
    'to' => [ // Text this array of numbers
        '+15555559410','+15555559411','+15555559412',
    ],
    'body' => 'this is an api test bulk'
   ]
);

print $message;

获取帮助

如果您需要安装或使用库的帮助,请提交支持工单

如果您在库中发现错误或希望添加新功能,请在此存储库中打开问题或拉取请求!