Skip to content
s00d edited this page Aug 6, 2020 · 5 revisions

Onlinesim Python API

Wrapper for automatic reception of SMS-messages by onlinesim.ru

N|Solid

Installation

You can install or upgrade package with:

$ pip install onlinesimru --upgrade

Or you can install from source with:

$ git clone https://github.com/s00d/onlinesim-python-api
$ cd onlinesim-python-api
$ python setup.py install

...or install from source buth with pip

$ pip install git+https://github.com/s00d/onlinesim-python-api

Example

from onlinesimru import GetFree, GetRent, GetProxy, GetForward, GetUser, GetNumbers


def main():
    client = GetUser('YOUR_TOKEN')
    balance = await client.balance()
    print(balance)

main() # asyncio.run(main()) для python 3.7+

Example2

from onlinesimru import GetFree, GetRent, GetProxy, GetForward, GetUser, GetNumbers


def main():
    numbers = GetNumbers('YOUR_TOKEN')
    input('Press enter if you sms was sent')

    tzid = numbers.get('service')
    print(tzid)
    code = numbers.wait_code(tzid)
    print(code)

main() # asyncio.run(main()) для python 3.7+

Documentation

All documentation is in the wiki of this project - Documentation

Bugs

If you have any problems, please create Issues here https://github.com/s00d/onlinesim-python-api/issues

API

GetUser API

GetNumbers API

GetRent API

GetProxy API

GetForward API

GetFree API

Clone this wiki locally