Skip to main content

A client for interacting with the CallNowUSA API

Project description

CallNowUSA

A Python client for the CallNowUSA API to send messages, manage calls, forward SMS, stop SMS forwarding, and check the inbox. Please visit CallNowUsa.com for more information.

Installation

pip install callnowusa

Usage

from callnowusa import Client

# Initialize CallNowUSA client
account_sid = 'YOUR_ACCOUNT_SID'  # e.g., 'SID_xxx...'
auth_token = 'YOUR_AUTH_TOKEN'   # e.g., 'AUTH_xxx...'
callnowusa_number = 'default'    # or your assigned CallNowUSA number

client = Client(account_sid, auth_token, callnowusa_number)

# Numbers to interact with
to_number = '+19876543210'
to_number2 = '+10987654321'

# 1. Send SMS
message = client.messages.create(
    body="Test message from CallNowUSA.",
    from_=callnowusa_number,
    to=to_number
)
print(f"Message Response: {message.fetch()}")

# 2. Direct Call
call = client.calls.create(
    to=to_number,
    from_=callnowusa_number,
    auto_hang=False  # False keeps call active; True hangs up after connect
)
print(f"Direct Call Response: {call.fetch()}")

# 3. Merge Call
merge_call = client.calls.merge(
    phone_1=to_number,
    phone_2=to_number2,
    from_=callnowusa_number
)
print(f"Merge Call Response: {merge_call.fetch()}")

# 4. SMS Forward
sms_forward = client.sms_forward(
    to_number=to_number,
    to_number2=to_number2,
    from_=callnowusa_number
)
print(f"SMS Forward Response: {sms_forward.fetch()}")

# 5. Stop SMS Forward
sms_forward_stop = client.sms_forward_stop(
    to_number=to_number,
    to_number2=to_number2,
    from_=callnowusa_number
)
print(f"SMS Forward Stop Response: {sms_forward_stop.fetch()}")

# 6. Check Inbox
inbox_check = client.check_inbox(from_=callnowusa_number)
print(f"Inbox Check Response: {inbox_check.fetch()}")

Requirements

  • Python 3.7+
  • requests (installed automatically via pip)

Setup

  1. Obtain account_sid, auth_token, and callnowusa_number from the CallNowUSA dashboard.
  2. Install the package using the command above.
  3. Replace placeholders in the usage examples with your credentials.

License

MIT

About

A Python client for interacting with the CallNowUSA API, supporting SMS messaging, call management, SMS forwarding, and inbox checking. For more details, visit CallNowUsa.com.

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

callnowusa-0.1.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

callnowusa-0.1.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file callnowusa-0.1.1.tar.gz.

File metadata

  • Download URL: callnowusa-0.1.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for callnowusa-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1ae6abd9f8a8fb6368c424ed55e99446f94f08e4a54e673519a69f15facb6194
MD5 b7f3a4bb7bf5f8d91e00538c2c558211
BLAKE2b-256 a88a0c4589bb5ba0d329c87c586546fba3b16fbdf59260955fd6152facbbb865

See more details on using hashes here.

File details

Details for the file callnowusa-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: callnowusa-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for callnowusa-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8d68c3eed9e5057232da3b4c760bb7c9fc0f5f4aaa447f0406ac1a3651a49048
MD5 dc23c26bebe709ed639122c647ea8276
BLAKE2b-256 380431a1a85778c595869248829f78ef98ce1c3a2c783fbdb938aac54c5a2217

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