Download the PHP package toucantext/php-sdk without Composer

On this page you can find all versions of the php package toucantext/php-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 php-sdk

ToucanText

ToucanText PHP SDK

This library requires a minimum PHP version of 5.5

This is the PHP SDK library to use ToucanText's API. To use this, you'll need a ToucanText account and have access to your API credentials. Sign up for your free trial at toucantext.com.

Installation

To use the PHP SDK, create a ToucanText account.

To install the PHP client to your project, we recommend using Composer.

You don't need to clone this repository to use the library in your own projects, you can use Composer to install it from Packagist.

If you're new to Composer, here are some resources that you may find useful:

Instantiating the SDK Client

Pass in the configuration to the client:

Note: If you are unsure what your 'api_username' or 'api_password' are, contact [email protected].

Using the Client

Getting all messages

To return a list of all your messages (both inbound and delivery receipts):

By default, this returns a maximum of 25 messages but does NOT acknowledge them. To override this, pass the following parameters (the first denotes whether to acknowledge messages; the second for the maximum number of messages to return):

Getting inbound messages or delivery receipts only

To return a list of inbound messages or delivery receipts:

By default, this returns a maximum of 25 inbound messages or delivery receipts but does NOT acknowledge them. To override this, pass the following parameters (the second denotes whether to acknowledge messages; the third for the maximum number of messages to return):

Sending a message

To send a message you, can call the following:

You can also set a source address and request a delivery receipt:

Acknowledging delivery receipts and messages

When you retrieve your inbound messages or delivery receipts, there is a MbStorageId element within the response of the query. This ID can be used to acknowledge messages and delivery receipts individually.

To acknowledge a message or delivery receipt create an array with the ID's to acknowledge and then call the following:

Handling Exceptions

Aside from errors that may occur due to the call, there may be other Exceptions thrown. To handle them, wrap your call in a try catch block:

License

This library is released under the MIT License.


All versions of php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
guzzlehttp/guzzle Version ~6.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 toucantext/php-sdk contains the following files

Loading the files please wait ....