Facebookpixel Send SMS with Python Effortlessly – Turn Your Mobile into an SMS Gateway - SMSMobileAPI

Connect Python to your Mobile Phone to send SMS or WhatsApp

Transform Your Phone into an SMS and WhatsApp Gateway with SMS Mobile API
Easily send and receive SMS and send WhatsApp messages directly from your mobile phone using Python. Automate your communication effortlessly with a few simple lines of code!

Looking for a fast, secure, and simple way to send and receive SMS, or send WhatsApp messages using your mobile phone and Python? SMS Mobile API is the ultimate solution! It allows you to send SMS instantly, retrieve incoming SMS, and send WhatsApp messages, turning your phone into a powerful communication tool for convenience, automation, and reliability.

To get started, simply install the module with the following command:

pip install smsmobileapi

Before using the Python module, make sure to download our secure and verified mobile app on iOS and Android:

Our app are verified by both Google and Apple, ensuring a stable and secure experience that respects your privacy. Whether you're sending notifications or automating messaging workflows, the SMS Mobile API is the perfect solution to manage SMS communication directly from your phone with Python!

Example Request to Send an SMS

Here is an example of Python code to send an SMS using the smsmobileapi module:

With this code, an SMS will be sent directly from your Python script via your mobile phone, using your phone number.
This means your contact can reply directly to you, and the SMS are free as it uses your mobile plan.

from smsmobileapi import SMSSender

# Initialize the SMS sender with your API key
sms = SMSSender(api_key='YOUR_API_KEY')

# Send an SMS
response = sms.send_message(to='PHONENUMBER', message='Hello from Python!')
print(response) # This will print the response from the API


Example Request to Send a WhatsApp Message

Here is an example of Python code to send a WhatsApp message using the smsmobileapi module:

With this code, a WhatsApp message will be sent directly from your Python script via your mobile phone, using your linked WhatsApp account.
This allows you to send messages effortlessly, and there are no per-message costs, as it uses your phone's WhatsApp connection.

from smsmobileapi import SMSSender

# Initialize the SMS sender with your API key
sms = SMSSender(api_key='YOUR_API_KEY')

# Send a WhatsApp message
response = sms.send_message(to='PHONENUMBER', message='Hello from Python via WhatsApp!', sendwa=1, sendsms=0)
print(response) # This will print the response from the API

Key Features

  • WhatsApp Messages: Send messages directly via WhatsApp using your mobile connection.
  • SMS Messages: Still need SMS? You can send both SMS and WhatsApp messages with ease.
  • No Hidden Costs: Both SMS and WhatsApp messages are sent using your mobile plan—no per-message fees.
  • Simple Integration: A few lines of Python code are all you need to get started.


Example Request to Retrieve Received SMS

Here is an example of Python code to retrieve the SMS messages received on your mobile phone:

With this script, you can retrieve all SMS messages received on your mobile phone in real-time, allowing you to interact with your contacts' replies via SMS.

from smsmobileapi import SMSSender

# Initialize the SMS sender with your API key
sms = SMSSender(api_key='YOUR_API_KEY')


# Retrieve received SMS messages
received_messages = sms.get_received_messages()
print(received_messages) # This will print the list of received SMSx

Connect My Mobile
en_USEnglish