PHPackages                             alphasms/gateway - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. alphasms/gateway

ActiveLibrary[API Development](/categories/api)

alphasms/gateway
================

AlphaSMS gateway

23.5kPHP

Since Sep 7Pushed 5y agoCompare

[ Source](https://github.com/alphasms/gateway)[ Packagist](https://packagist.org/packages/alphasms/gateway)[ RSS](/packages/alphasms-gateway/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

AlphaSMS API gateway
====================

[](#alphasms-api-gateway)

Send SMS and Viber message via AlphaSMS ([alphasms.ua](https://alphasms.ua/)) using this framework package.

Library for sending and checking of the statuses SMS and Viber messages via the AlphaSMS.ua service.

#### PHP &gt;= 5.6.0

[](#php--560)

Minimum PHP interpreter version is `5.6`

Installation
------------

[](#installation)

Install the package via composer.

```
composer require alphasms/gateway
```

How to get an API key
---------------------

[](#how-to-get-an-api-key)

- Register in the website [https://alphasms.ua/](https://alphasms.ua)
- Sign in into personal cabinet
- Visit a settings section
- Open a tab `API` and find you own `API key`

### Usage in Yii2

[](#usage-in-yii2)

Put to `component` section in you config file a next fragment:

```
    'alphasms' => [
        'class' => 'alphasms\gateway\AlphaSMS',
        'config' => [
            'api_key' => '',
            'sms_sender' => 'Your alphaname',
        ],
    ],
```

Here you can fill all of parameters `api_key`, `sms_sender`, `viber_sender`, etc.

You always can access an AlphaSMS gateway like in example bellow:

```
Yii::$app->alphasms::sendSms([...]);
```

Usage in Laravel and in other frameworks
----------------------------------------

[](#usage-in-laravel-and-in-other-frameworks)

In other cases you should define a used class and call a static method:

```
