Tags: English

SMSAPI PHP client new version released

9 January, 2019
Reading time: 2 min 12 sec
Tech blog post #02

SMSAPI PHP client has been on market for 6 years. Ever since it has been downloaded at least 130.000 times according to Packagist statistics. That’s a great success for us and encouragement that keeps us focused on our library quality every day. We would like to announce that a brand new version of SMSAPI PHP client 2.0 has been released.

Our main goal was to make the use of API features more convenient for end users and more object oriented for programmers who would like to extend the library on their own.

What’s new?


Based on PHP version market share, we decided to go with the flow and to rewrite the client using PHP 7.0. Popularity of PHP 7 is constantly growing each day and support for PHP 5 has dropped. However, don’t worry if you are not ready yet for the change – you will still be able to use the library v1 branch.


The library has been enriched with some new features: ping, short URL and contacts. You can now use our ping endpoint to check our platform status. You can now also easily access our short URL basic services. Contacts support has been extended. You can pin/unpin contacts, manage contact groups and search for group permissions.

Proxy servers

Connecting via proxy servers to SMSAPI is now supported.


We added psr/log support. The psr/log is nowadays the standard for modern PHP projects. You can configure how to proccess SMSAPI client logs with ease.

What has changed?

Superseded endpoints

We constantly work hard to make our API more user friendly. Over a few years RESTfull APIs have become a standard. Continuously we are improving SMSAPI enpoints to supersede some old-fashioned endpoints with new ones. The client is now supporting the profile and subusers endpoints over user.do service and SMS/sendernames over sender.do service. That change should be transparent to the library users.

Superseded transport layer

We decided to make use of Guzzle library as HTTP transport layer for our library. That makes our client more object oriented and testable than ever.

What has been removed?

Basic authorization

Basic authorization has been removed entirely. You should start using token authorization instead.

How to switch to v2?

We encourage you to use the Composer, a dependency manager for PHP, to install our new client library. If you are already using Composer as dependency manager just change smsapi/php-client version constraint to ‘^2’ and run composer update. To start using SMSAPI PHP client within a new project simply run ‘composer require smsapi/php-client’.

Not using the Composer? Visit our SMSAPI client repository GitHub page and download an archive.