承接 platform5/sdk 相关项目开发

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

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

platform5/sdk

Composer 安装命令:

composer require platform5/sdk

包简介

PHP SDK for the Platform5 Developer API — send SMS, email, and more

README 文档

README

PHP SDK for the Platform5 Developer API.

Install

composer require platform5/sdk

Usage

<?php

require 'vendor/autoload.php';

use Platform5\Sdk\Platform5;

$client = new Platform5('p5_live_abc123def456', 'http://localhost:8084');

// Send an SMS
$sms = $client->sms()->send([
    'to' => '+254712345678',
    'message' => 'Your appointment is confirmed for tomorrow at 10 AM.',
    'from' => 'MyBrand',
]);
echo $sms['message_id'];

// Send an email
$client->email()->send([
    'to' => 'user@example.com',
    'subject' => 'Welcome',
    'body' => 'Hello!',
    'from' => 'MyBrand',
]);

// Check message status
$status = $client->messages()->get('msg-uuid');

// Check balance
$balance = $client->account()->getBalance();

Configuration

new Platform5(
    apiKey: 'p5_live_abc123',
    baseUrl: 'http://localhost:8084',  // optional
);

Services

Method Endpoint
$client->sms()->send([...]) POST /v1/sms/send
$client->email()->send([...]) POST /v1/email/send
$client->messages()->get($id) GET /v1/messages/{id}
$client->account()->getBalance() GET /v1/balance
$client->health() GET /health

Error Handling

use Platform5\Sdk\Exception\RateLimitException;
use Platform5\Sdk\Exception\Platform5Exception;

try {
    $client->sms()->send([...]);
} catch (RateLimitException $e) {
    echo "Rate limited: {$e->remaining}/{$e->limit}";
} catch (Platform5Exception $e) {
    echo "API error {$e->statusCode}: {$e->getMessage()}";
}

Requirements

  • PHP 8.2+

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-07-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固