The transaction ID for the message is returned by the endpoint after a successful submission. The following example Python code makes a REST HTTPS call to the Melrose Labs SMS API endpoint to send the message Hello World €£$ to mobile number 447712345678 from MelroseLabs.
Replace the value with the REST API key for your account. The following are required to send SMS with REST using Python:Ĭreate the file sendsms.py containing the code below. The following are required to send SMS using Python: Use it for transactional messaging and notifications between your application and mobiles. Python is a programming language and can be used to quickly and easily add SMS support for programmatically sending and receiving SMS messages.
The following are required to send SMS with REST:ĪPI key for the REST SMS API of the Melrose Labs Tyr SMS Gateway REST uses JSON to carry the parameters that relate to the REST operation that you are performing. A REST account can easily be obtained for using the Tyr SMS Gateway. REST (REpresentational State Transfer) uses the HTTP protocol (HTTPS) for conveying SMS operations. The requests library can be used to make REST requests using Python to send SMS.