1.0.0 • Published 5 years ago

mobizon-ua v1.0.0

Weekly downloads
4
License
ISC
Repository
github
Last release
5 years ago

Русский | English

Библиотека для работы с АПИ Mobizon

В версиях Node.js < 6.3.0 необходимо запускать с флагом --harmony-proxies. Например, node --harmony-proxies script.js

Для начала работы с API Вам необходимо сделать три простых шага:

  1. Зарегистрироваться в системе Mobizon
  2. Включить в своем аккаунте доступ к API
  3. Получить ключ API - после включения доступа к API Вам будет сгенерирован и показан ключ доступа.

Подробнее процесс подключения к API описан на нашем сайте

Установка через npm

npm install --save mobizon

Документация по методам API

Документация с описанием всех доступных на данный момент методов API, их входных параметров, формата возвращаемых данных, списка возможных кодов ответа API доступна по адресу http://docs.mobizon.com/api/.

Примеры реализации типичных сценариев

mobizon = require(mobizon)("Ваш ключ API");
// Получение состояния баланса
mobizon.User.GetOwnBalance({}, callbackFunction(error, data))
// Отправка SMS сообщения
mobizon.Message.SendSMSMessage({recipient: 'PHONE_NUMBER', text: 'Success'}, callbackFunction(error, data))

Library for communicating with Mobizon SMS HTTP API

For Node.js < 6.3.0 you need run node with --harmony-proxies flag. Example, node --harmony-proxies script.js

To start sending SMS messages through Mobizon API you should do three simple steps:

  1. Register account on Mobizon website
  2. Enable API in your Mobizon account settings
  3. Copy API key - when you enable API access in your account, system provides you with API key, which you use then in your software.

Details of connection your software to API is described at Mobizon website

Install throw npm

npm install --save mobizon

API methods documentation

You could review online documentation for detailed description of all currently available API methods, input parameters, result formats, API result codes at http://docs.mobizon.com/api/.

Typical scenarios code

We have started development of typical usage scenarios in docs/examples. If you have own examples of integration, please help us improve our code base - just send us some code examples to support@mobizon.com and we will glad to put your code to our repo.

mobizon = require(mobizon)("YOUR API KEY");
// Get balance amount
mobizon.User.GetOwnBalance({}, callbackFunction(error, data))
// Send SMS message
mobizon.Message.SendSMSMessage({recipient: 'PHONE_NUMBER', text: 'Success'}, callbackFunction(error, data))