Skip to main content

VakSms API library

Project description

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

# Create an instance of the vaksms class with your API key
vakapi = vaksms('your_apikey')

# Get the user's balance
balance = vakapi.getBalance()
print(f"Current balance: {balance} rub")

# Get the number of available numbers for a specific service
count = vakapi.getCountNumber('service_code')
print(f"Available numbers: {count}")

# Get a temporary phone number
number = vakapi.getNumber('service_code')
print(f"Temporary number: {number}")

# Extend the duration of a previously received number
extended_number = vakapi.prolongNumber('service_code', 'phone_number')
print(f"Extended number: {extended_number}")

# Change the status of an operation ID
status = vakapi.setStatus('operation_id', 'end')
print(f"Status: {status}")

# Activate SMS code for a specific operation ID
sms_code = vakapi.getSmsCode('operation_id')
print(f"SMS code: {sms_code}")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vaksms-0.3.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

vaksms-0.3-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page