Download the PHP package wearesho-team/turbosms-message-delivery without Composer

On this page you can find all versions of the php package wearesho-team/turbosms-message-delivery. 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 turbosms-message-delivery

TurboSMS Integration

Test & Lint Latest Stable Version Total Downloads codecov

wearesho-team/message-delivery implementation of Delivery\ServiceInterface

Installation

Quick Start

Variable Required Description
TURBOSMS_HTTP_TOKEN Yes HTTP API Token
TURBOSMS_SENDER no Sender name, that was declared in your account
TURBOSMS_VIBER_SENDER no Viber-specific sender name (optional)

Usage

Configuration

ConfigInterface have to be used to configure requests. Available implementations:

Additional methods

Besides implementing Delivery\ServiceInterface Service provides

Delivery failures

send() returns a Delivery\Result only when TurboSMS issued a message_id. When the recipient is rejected (blocklist, unsupported country, insufficient balance, duplicate within 90 seconds, …) the API returns "message_id": null for that recipient, and send() throws a Delivery\Exception carrying the recipient, the per-recipient status and the overall response status:

The recipient is taken from the phone field of the API response, which is normalised and therefore has no leading +; it falls back to MessageInterface::getRecipient() when the API omits the field.

getCode() returns the per-recipient response code (406 above) when the API provides one, otherwise the top-level code. See the status code table for the full list.

Note that a request can succeed overall while an individual recipient fails — TurboSMS reports this as 802/803. A rejected recipient is documented as always carrying message_id: null, so send() throws for every such response. Should the API ever return a per-recipient error alongside a message_id, the result is returned with Delivery\Result\Status::Failed and reason() set to the per-recipient status rather than being reported as Accepted.

batch() does not throw for a rejected recipient, since that would abandon the remaining results. It yields a Failed result whose messageId() falls back to the internal request key. It does still throw mid-iteration if an individual request comes back with an empty response_result.

Sender Name Configuration

The library supports different sender names for SMS and Viber channels:

Priority Order (highest to lowest):

  1. Message-level sender - Set via options, applies to all channels
  2. Viber-specific sender - Set via config for Viber channel only
  3. Default sender - Fallback for all channels

Example with Separate Viber Sender:

Environment Configuration:

Authors

License

MIT


All versions of turbosms-message-delivery with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
guzzlehttp/guzzle Version ^6.5.8 || ^7.4.5
horat1us/environment-config Version ^1.4
wearesho-team/message-delivery Version ^2.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 wearesho-team/turbosms-message-delivery contains the following files

Loading the files please wait ...