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.5.0.tar.gz (111.0 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.5.0-py3-none-any.whl (37.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for aiosmsactivate-1.5.0.tar.gz
Algorithm Hash digest
SHA256 bc93b041ea03d3ded454ba70112328f6cb95bf566b33bab44a253920e4a82752
MD5 3c6b24d22ccc8f451c9ade555c98a597
BLAKE2b-256 ad8c0f93a53fa280778f4ed0b1f647d90c4a498648a523a124d8d2f009c8a0c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aiosmsactivate-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 37.2 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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c56e92d2aa5ff6881fd49ae706f9b24c90ac3c139362cd20706cb977a9bc4d2e
MD5 6ff801d76136708f1c74df40b1c3dd3c
BLAKE2b-256 ba0067096789995fb15a0caf6a0a29d0e0fd6e39a86a6828277e95be581128d1

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