vaksms
VakSms is a Python library that provides an API for interacting with the vak-sms.com service. It allows you to perform various operations such as getting the user's balance, retrieving available phone numbers, renting temporary phone numbers, activating SMS codes, and more.
Installation
You can install the library using pip:
pip install vaksms
Usage
Get apikey: https://vak-sms.com/api/vak/
Services: https://vak-sms.com/api/vak/#serviceCodeList1
Countres and operators: https://vak-sms.com/api/vak/#countryOperatorList1
from vaksms import vaksms
vakapi = vaksms('your_apikey')
balance = vakapi.getBalance()
print(f"Current balance: {balance} rub")
count = vakapi.getCountNumber('service_code')
print(f"Available numbers: {count}")
number = vakapi.getNumber('service_code')
print(f"Temporary number: {number}")
extended_number = vakapi.prolongNumber('service_code', 'phone_number')
print(f"Extended number: {extended_number}")
status = vakapi.setStatus('operation_id', 'end')
print(f"Status: {status}")
sms_code = vakapi.getSmsCode('operation_id')
print(f"SMS code: {sms_code}")