I am developing a python script that will find the LAtitude and Longitude of a particular location and store it in a text file . The location will be sent through an SMS to the python script .I can do the later part of finding the latitude and longitude using 'geocode' library in python , but i'm not sure as to how to accept the data from SMS .
I have worked with the TWILIO module previously and i know how to Send SMS via Python script to a phone number using it . But I want to know the process of receiving SMS message sent from a phone number and then using that message body in the python script for further operation .
This is how I have been sending SMS to phone numbers -
import os
from twilio.rest import TwilioRestClient
accountSID = '****'
authToken = '***'
twilioCli = TwilioRestClient(accountSID, authToken)
myTwilioNumber = '+1 ***'
myCellPhone = '+***'
message = twilioCli.messages.create(body=string, from_=myTwilioNumber, to=myCellPhone)
If you can provide a solution to do the opposite of the above process i.e receive an SMS instead of sending it , through TWILIO service , itll be very helpful.