Skip to main content

Python asyncio wrapper for sms-activate.io API

Project description

AioSmsActivate

Getting Started

Simple usage

from aiosmsactivate import SmsActivate
from aiosmsactivate.types import SetActivationStatus

import asyncio


sa = SmsActivate('token')

async def main():
    balance = await sa.get_balance()
    print(balance) # 6.25
    
    number = await sa.purchase('ya')
    number.activation_id # 3807035855
    number.phone_number # '79238944456'
    number.operator # 'mtt'
    print(number)
    # activation_id=3809954454 phone_number='79927146212' activation_cost=0.2 
    # country_code='0' can_get_another_sms=True activation_time='2025-07-09 01:14:45' 
    # operator='mtt' activation_unix_time=1654093857
    
    code = await number.wait_sms_code(timeout=300)
    print(code) # 1234
    
    status = await number.get_activation_status()
    
    await number.set_activation_status(SetActivationStatus.CANCEL) # Отменить номер || Cancel number
    await number.set_activation_status(8) # Отменить номер || Cancel number

    service = await sa.get_service('ya', 0) # 0 it is ru country
    print(service)
    # code='ya' name='Yandex/Uber' country='0' 
    # price=0.115 retail_price=0.2 free_price_map={'0.3067': 17134, '0.3065': 16996, ...} 
    # count=11049 physical_count=5334
    
asyncio.run(main())

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

aiosmsactivate-1.4.3.tar.gz (110.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiosmsactivate-1.4.3-py3-none-any.whl (36.9 kB view details)

Uploaded Python 3

File details

Details for the file aiosmsactivate-1.4.3.tar.gz.

File metadata

  • Download URL: aiosmsactivate-1.4.3.tar.gz
  • Upload date:
  • Size: 110.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for aiosmsactivate-1.4.3.tar.gz
Algorithm Hash digest
SHA256 4e9e242f81088794223cbe086a2a9878fd4e81184c6271114a9e1013459c391d
MD5 b4f965e0848a54ed467aa83f5e5df352
BLAKE2b-256 f96ddba1d23461a574349b6fcc95d11dc59d31034a99cc831ea067c2e62217d8

See more details on using hashes here.

File details

Details for the file aiosmsactivate-1.4.3-py3-none-any.whl.

File metadata

  • Download URL: aiosmsactivate-1.4.3-py3-none-any.whl
  • Upload date:
  • Size: 36.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for aiosmsactivate-1.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d8445a400fce9e5a75420f49ec684b2783f7e11b34b0b56be07a503d44d04ebb
MD5 207ddd9bf35eb93b6ea01ce9fb1c5f80
BLAKE2b-256 4164cd0705f8dfd794e8b9ddc36a90e83e68c4f5fbfee42c67483df3eeec5cb1

See more details on using hashes here.

Supported by

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