Skip to content

Simple code for interacting with SMSPVA API in Python

License

Notifications You must be signed in to change notification settings

ssshipilo/smspva

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMSPVA service

SMSPVA API (Activations)

I needed this site for my project, so I give you a simple code to interact with SMSPVA service.

Important! In this code, there is only interaction with the Activations API, no Rent API but in fact if you are an experienced developer you can use the server class method requests() to make requests to their site without writing your own API. By calling smspva.requests(endpoint, headers_array, method)

Installation:

git clone https://github.com/ssshipilo/smspva.git

Beginning of interaction

Get an API token to interact on the page https://smspva.com/user/{your_username}/

Code:
from smspva.api import SMSPVActivator

if __name__ == "__main__":
    smspva = SMSPVActivator("<YOU-API-TOKEN>")

Basic methods:

Balance

result = smspva.get_balance()
print(result)

Get number

result = smspva.get_number(country="TZ", service="opt1")
print(result)

Users info

result = smspva.get_users_info()
print(result)

Get all prices

result = smspva.get_all_prices()
print(result)

Get service prices

resut = smspva.get_prices_service("opt219", filter="lower")
print(result)

Get orders

resut = smspva.get_orders()
print(result)

Get all countries

resut = smspva.get_all_countries()
print(result)

Get all services

resut = smspva.get_all_services()
print(result)

Get available numbers

resut = smspva.get_available_numbers(country="SI")
print(result)

About

Simple code for interacting with SMSPVA API in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages