SMS API suggestion for python web application

I am developing a web application using Python, how do I integrate an SMS API with my application?
import urllib.request
import urllib.parse

def sendSMS(uname, hashCode, numbers, sender, message):
data = urllib.parse.urlencode({'username': uname, 'hash': hashCode, 'numbers': numbers,
'message' : message, 'sender': sender})
data = data.encode('utf-8')
request = urllib.request.Request("http://api.txtlocal.com/send/?")
f = urllib.request.urlopen(request, data)
fr = f.read()
return(fr)

resp = sendSMS('user', 'hash', '447123456789',
'Jims Autos', 'This is your message')
print (resp)

Please read their doc
https://www.textlocal.com/integrations/api/


Oh, cpluscplus I love you please don't be slow
If i could I would donate a VPS for you my love.
Integrating Karix SMI API can be done within minutes, you will just need to follow the below steps:
1. Install Karix Module “pip install karix”
2. Sign up and claim your free credits by verifying number.
3. Keep account ID and auth token handy. (For future usage)
4. Add following code.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from _future_ import print_function
 import time
 import karix
 from karix.rest import ApiException
 from karix.configuration import Configuration
 from karix.api_client import ApiClient
 from pprint import pprint
 

 # Configure HTTP basic authorization: basicAuth
 config = Configuration()
 config.username = 'YOUR_AUTH_ID'
 config.password = 'YOUR_AUTH_TOKEN'
 # create an instance of the API class
 api_instance = karix.MessageApi(api_client=ApiClient(configuration=config))
 message = karix.CreateMessage(source="<source>", destination=["<destination>"], text="Sent from python SDK")
 

 api_response = api_instance.send_message(message=message)
 pprint(api_response)


You can refer to their documentation here: http://docs.karix.io
Topic archived. No new replies allowed.