Send an SMS Using Python

Share on Facebook0Tweet about this on TwitterShare on LinkedIn0Share on Google+0

The TextMagic API Python wrapper can save you a lot of time, as it includes all the necessary API commands and tests. It only takes a few seconds to download it from GitHub and to install it into your own app or software. After installation, you’ll then be able to send text messages.

Get it now on GitHub

Installation Instructions

Quick Installation

Run the following command to install the TextMagic Python helper using pip, a package management system used to install and manage software packages written in Python:

pip install textmagic

Manual Installation

You can also install the TextMagic Python helper from the GitHub repository using git. Run the following commands:

git clone git@github.com:textmagic/textmagic-rest-python.git
cd textmagic-python
python setup.py install

Requirements

The Python wrapper for the TextMagic API has the following requirements:

  • Python 2.6 or higher

Sending an SMS using Python (an example)

Below is an example of how to send a text message using Python.

from textmagic.rest import TextmagicRestClient
 
username = "your_textmagic_username"
token = "your_apiv2_key"
client = TextmagicRestClient(username, token)
 
message = client.messages.create(phones="9990001001", text="Hello TextMagic")

Support

If you need help with the wrapper, or if you have any suggestions for improvements and/or if you have enquiries regarding the Python SMS API, please contact us by emailing support@textmagic.com.