File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88account_id = os .environ .get ("ACCOUNT_ID" )
99api_key = os .environ .get ("API_KEY" )
1010api_server = os .environ .get ("API_SERVER" , "https://www.freeclimb.com/apiserver" )
11+ from_number = os .environ .get ("FREECLIMB_NUMBER" )
12+
13+ if not account_id or not api_key or not from_number :
14+ print ("ERROR: ENVIRONMENT VARIABLES ARE NOT SET. PLEASE SET ALL ENVIRONMMENT VARIABLES AND RETRY." )
15+ quit ()
1116
1217app = Flask (__name__ )
1318
2530def incomingSms ():
2631 if request .method == 'POST' :
2732 message = "Hello World!"
28- _from = os . environ . get ( "FREECLIMB_NUMBER" ) #Your FreeClimb Number
33+ _from = from_number #Your FreeClimb Number
2934 to = request .json ['from' ]
3035 message_request = freeclimb .MessageRequest (_from = _from , text = message , to = to )
3136 api_instance .send_an_sms_message (message_request )
You can’t perform that action at this time.
0 commit comments