Download the PHP package onetech/whatsapp-360-dialog-sdk without Composer

On this page you can find all versions of the php package onetech/whatsapp-360-dialog-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package whatsapp-360-dialog-sdk

360 Dialog PHP SDK (Cloud API v2)

一个用于360 Dialog WhatsApp Business API Cloud API v2的PHP SDK包。

⚠️ 重要更新: 本 SDK 已升级到 Cloud API v2。如果您从 v1 (On-Premise API) 迁移,请查看 迁移指南。

安装

快速开始(Cloud API v2)

用法:域访问器(推荐)

客户端按 API 资源域拆分,推荐通过域访问器调用:

旧的扁平方法(sendMessage()、uploadMedia()、setWebhookUrl() 等)仍然可用,已标注 @deprecated,内部一行委托到对应域方法,后续版本才会移除。

重试与错误语义在传输层统一:4xx 客户端错误立即抛出 Dialog360\Exception\Dialog360ClientError(携带 API 错误响应体,不重试);5xx/网络错误指数退避重试,耗尽后抛 Dialog360Exception。例外:messages()->send() 捕获 4xx 并返回 isSuccess=false 的 MessageResponse(与历史行为一致)。

功能特性

配置

环境变量

创建 .env 文件并添加以下配置:

客户端配置

消息类型

文本消息

媒体消息

模板消息

交互式消息

健康状态(Cloud API)

媒体文件(Cloud API)

上传 / 查询 / 下载 / 删除(媒体存储 30 天,上传限速 25 次/秒/号码):

分块续传上传(Resumable Upload)

大文件或弱网场景使用 POST /uploads + POST /upload:{session-id},中断后可按服务端偏移续传。 上传完成后返回文件句柄 handle(目前主要用于更新头像等资料;普通媒体消息仍建议用 upload() 取 media_id)。

分块大小必须为 8KB(8192 字节)的整数倍,默认 MediaApi::DEFAULT_CHUNK_SIZE(4MB)。

错误处理

测试

迁移支持

如果您从 v1 (On-Premise API) 迁移到 v2 (Cloud API):

  1. 📖 阅读 迁移指南
  2. 🔄 更新基础 URL 到 https://waba-v2.360dialog.io
  3. 🔑 确保使用最新的 API 密钥
  4. 🧪 运行测试验证配置

贡献

欢迎提交Issue和Pull Request!

许可证

MIT License


All versions of whatsapp-360-dialog-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-json Version *
guzzlehttp/guzzle Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package onetech/whatsapp-360-dialog-sdk contains the following files

Loading the files please wait ...