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
- Obtain
account_sid,auth_token, andcallnowusa_numberfrom the CallNowUSA dashboard. - Install the package using the command above.
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ae6abd9f8a8fb6368c424ed55e99446f94f08e4a54e673519a69f15facb6194
|
|
| MD5 |
b7f3a4bb7bf5f8d91e00538c2c558211
|
|
| BLAKE2b-256 |
a88a0c4589bb5ba0d329c87c586546fba3b16fbdf59260955fd6152facbbb865
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d68c3eed9e5057232da3b4c760bb7c9fc0f5f4aaa447f0406ac1a3651a49048
|
|
| MD5 |
dc23c26bebe709ed639122c647ea8276
|
|
| BLAKE2b-256 |
380431a1a85778c595869248829f78ef98ce1c3a2c783fbdb938aac54c5a2217
|