Skip to main content

VAKSMS API for Python 3

About

This library is a wrapper for the https://vak-sms.com/api/vak/ API from enthusiasts. All methods are described and all types are explicitly defined. Methods that create requests to https://vak-sms.com/api/vak/ return a pydantic's models for each response. Please write about all problems related to the library to issues

API is up-to-date as of 22 May 2025.

Features

  • You can use multiple clients to work with multiple users or shops
  • All methods for working with API are implemented
  • The library returns strictly typed for responses from APIs
  • For each method, docstrings are used
  • The library handle {type: error} responses and throws VaksmsBadRequest exception
  • Modern, strict code for Python 3.10+

Library Installation

  • Install via pip: pip install synkvaksms
  • Download sources - git clone https://github.com/lolkofka/synkvaksms

Getting Started

first steps (best practic)

from synkvaksms import Vaksms


def main():
    client = Vaksms('TOKEN') # use vaksms.com domain (not work in russia)
    client = Vaksms('TOKEN', base_url='https://moresms.net') # work in russia

    number = client.get_number('ya')
    print(number.tel)  # 79995554433

    # recieve smscode
    sms_code = number.wait_sms_code(timeout=300, per_attempt=5) # do not indicate timeout and per_attempt
    print(sms_code) #1234

    # set status
    number.set_status('end')
    # bad - ban number
    # end - cancel number
    # send - new sms


main()

Get user balance

from synkvaksms import Vaksms


def main():
    client = Vaksms('TOKEN') # use vaksms.com domain (not work in russia)
    client = Vaksms('TOKEN', base_url='https://moresms.net') # work in russia
    balances = client.get_balance()
    print(balances)  # balance = 100.0


main()

Get number count

from synkvaksms import Vaksms

def main():
    client = Vaksms('TOKEN') # use vaksms.com domain (not work in russia)
    client = Vaksms('TOKEN', base_url='https://moresms.net') # work in russia
    
    data = client.get_count_number('cp')
    print(data)  # service='cp' count=4663 price=18.0


main()

Get country list

from synkvaksms import Vaksms


def main():
    client = Vaksms('TOKEN') # use vaksms.com domain (not work in russia)
    client = Vaksms('TOKEN', base_url='https://moresms.net') # work in russia
    data = client.get_country_list()
    print(data)  # [CountryOperator(countryName='Tajikistan', countryCode='tj', operatorList=['babilon mobile', 'beeline', 'megafon', 'tcell']), CountryOperator(countryName='Zimbabwe', countryCode='zw', operatorList=['econet', 'netone', 'telecel'])... ]


main()

Get number

from synkvaksms import Vaksms


def main():
    client = Vaksms('TOKEN') # use vaksms.com domain (not work in russia)
    client = Vaksms('TOKEN', base_url='https://moresms.net') # work in russia
    data = client.get_number('ya')
    
    # An exclusive function for obtaining the lifetime of a number
    # all known services whose lifetime differs from the standard 20 minutes
    # are included in the library database as of 10/02/2024
    # also work with "rent=True" parameter
    print(data.lifetime) # 1200 lifetime from date of purchase
    print(data.lives_up_to) # 1727823949 unix time of death
    
    print(data)  # tel=79296068469 service='ya' idNum='1725546315697382' lifetime=1200 lives_up_to=1727823949


main()

Recieve smscode

from synkvaksms import Vaksms


def main():
    client = Vaksms('TOKEN')  # use vaksms.com domain (not work in russia)
    client = Vaksms('TOKEN', base_url='https://moresms.net')  # work in russia
    data = client.get_sms_code('1725546315697382') # 1725546315697382 is number id (idNum)
    print(data)  # smsCode='1234'


main()

request a new sms

from synkvaksms import Vaksms


def main():
    client = Vaksms('TOKEN') # use vaksms.com domain (not work in russia)
    client = Vaksms('TOKEN', base_url='https://moresms.net') # work in russia
    data = client.set_status('1725546315697382', 'send') # 1725546315697382 is number id (idNum)
    print(data)  # ready


main()

get service full name, service info, service icons

this method not in official vaksms documentation

from synkvaksms import Vaksms


def main():
    client = Vaksms('TOKEN') # use vaksms.com domain (not work in russia)
    client = Vaksms('TOKEN', base_url='https://moresms.net') # work in russia
    data = client.get_count_number_list()
    print(data)  # {'mr': Service(name='VK - MailRu', icon='https://vak-sms.com/static/service/mr.png', info='Тут можно принять смс от сервисов VKGroup.Не забывайте проверять номера на занятость через восстановление. Подробнее в базе знаний - https://bit.ly/3M6tXup', cost=22.0, rent=False, quantity=41153, private=False), ... }
    print(data['mr'].name) # VK - MailRu
    

main()

Contact

License

Released under GPL by @lolkofka.

Metadata

Release files for synkvaksms 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for synkvaksms 1.0.0
File Size Uploaded Provenance Actions
synkvaksms-1.0.0.tar.gz 32.6 kB Without provenance Details for synkvaksms-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for synkvaksms 1.0.0
File Interpreter ABI Platform Actions
synkvaksms-1.0.0-py3-none-any.whl Python 3 none any Details for synkvaksms-1.0.0-py3-none-any.whl

Total release size: 66.6 kB

Release files / synkvaksms-1.0.0.tar.gz

Download URL synkvaksms-1.0.0.tar.gz
Size 32.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e557638e53937407564d098bd7a478a43fc64130f8d260f04d1b29a3d5fbe874
BLAKE2b-256 checksum
How to use checksums
0dd910e3aebd450f6e1d6aac6eaea0557716d8b04819133c4fa5ba9e945aaa6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release files / synkvaksms-1.0.0-py3-none-any.whl

Download URL synkvaksms-1.0.0-py3-none-any.whl
Size 34.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc5614909e498d25cbe84d895f612b29c86dbb367e7c4bc7c3ab722afbd24216
BLAKE2b-256 checksum
How to use checksums
3359873517ff251eaa24991f3a3216633845f8bb68aebc432fb7e41883a62936
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Security for synkvaksms 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page