life-api is used to interact with the life:) API from Ruby
Latest commit 176ee00 Aug 19, 2016 @mamantoha committed on GitHub Update


A Ruby library for interfacing with lifecell's undocumented/unannounced API.

lifecell — GSM operator in Ukraine.


Add this line to your application's Gemfile:

gem 'life-api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install life-api


First of all require the life-api library.

require 'life-api'


You can authenticate with life:) in two ways: with password or with token.

Authentication with password to the life:) API is accomplished using a phone number(msisdn) starting with the country code("380"), and SuperPassword(password).

msisdn = '38063xxxxxxx'
password = 'xxxxxx'

life = msisdn, password: password)
token = life.token
sub_id = life.sub_id

To obtain the SuperPassword send an SMS with key word PAROL to number 123.


life =
life.token = token
life.sub_id = sub_id

Now you can make requests to the API.

API Examples

Below you can see some the methods for working with life:) data.

Returns advanced information on the current subscriber


Sample response

    [{"name"=>"ICCID", "content"=>"89380062300016907xxx"},
     {"name"=>"PUK", "content"=>"25159xxx"},
     {"name"=>"PUK2", "content"=>"00036xxx"},
     {"name"=>"PIN2", "content"=>"55xx"},
     {"name"=>"IMSI", "content"=>"25506109310xxxx"},
     {"name"=>"PIN", "content"=>"70xx"},
     {"name"=>"LINE_STATE", "content"=>"ACT/STD"},
     {"name"=>"USE_COMMON_MAIN", "content"=>"false"},
     {"name"=>"LANGUAGE_ID", "content"=>"uk_tr"},
     {"name"=>"DEVICE_NAME", "content"=>"HTC Sensation (PG58130)"},
     {"name"=>"LINE_SUSPEND_DATE", "content"=>"2014-03-21T00:00:00+02:00"}],
    [{"code"=>"Line_Main", "amount"=>"12.83"},
     {"code"=>"Line_Bonus", "amount"=>"0.00"},
     {"code"=>"Line_Debt", "amount"=>"0.00"}],
   "tariff"=>{"code"=>"IND_PRE_YOUTH", "name"=>"Crazy day"}}}

Returns the balance of the current subscriber


Sample response

    "name"=>"Free Internet"},
    "name"=>"Free Internet [WAP]"},
    "name"=>"Internet [Crazy Day]"},
    "name"=>"Used Internet [Week]"},
    "name"=>"Free MMS [in Ukraine]"},
    "name"=>"Free SMS [in Ukraine]"},
    "name"=>"100 min «life:) Сrazy day maximum» [other mob operators]"},
    "name"=>"Free minutes [Family Numbers]"},
    "name"=>"Free minutes [Free life:) Donbas]"},
    "name"=>"Free minutes [life:) network]"},
     "Free minutes [other mobile operators and fixed numbers of Ukraine]"},
    "name"=>"Line Bonus"},
    "name"=>"Line Main"}]}

Returns payments history for calendar month in format 'YYYY-mm'


Sample response

      "type"=>"Payment via WEB",
      "type"=>"Payment via WEB",

Supported Rubies

Tested with the following Ruby versions:

  • MRI 2.3.0


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License and Author

Copyright (c) 2013-2016 by Anton Maminov

This library is distributed under the MIT license. Please see the LICENSE file.