def main(): # API Credential 정보 # https://www.coolsms.co.kr/index.php?mid=service_setup&act=dispSmsconfigCredentials api_key = 'NCS52A57F48C3D32' api_secret = '5AC44E03CE8E7212D9D1AD9091FA9966' # 수신번호 to = '01000000000' # 발신번호 # 2015/10/16 발신번호 등록제 시행에 따라 사전에 등록된 발신번호만 허용 # http://www.coolsms.co.kr/index.php?mid=service_setup&act=dispSmsconfigSenderNumbers sender = '01012345678' # 메시지 내용 message = 'MMS 2,000 바이트까지 입력가능합니다' # API Key, API Secret, App Version cool = coolsms.rest(api_key, api_secret, 'Example 1.0') # 메시지 발송 요청 status = cool.send(to,message,sender,mtype='mms',subject='MMS 제목(40바이트)',image='test.jpg') # 리턴값 출력 print status # 리턴값이 False이면 오류 if status == False: print cool.get_error()
def main(): # API Credential 정보 # https://www.coolsms.co.kr/index.php?mid=service_setup&act=dispSmsconfigCredentials api_key = "NCS52A57F48C3D32" api_secret = "5AC44E03CE8E7212D9D1AD9091FA9966" # 수신번호 to = "01000000000,01011111111" # <--- input comma-separated numbers # 발신번호 # 2015/10/16 발신번호 등록제 시행에 따라 사전에 등록된 발신번호만 허용 # http://www.coolsms.co.kr/index.php?mid=service_setup&act=dispSmsconfigSenderNumbers sender = "01012345678" # 메시지 내용 message = "테스트 메시지" # API Key, API Secret, App Version cool = coolsms.rest(api_key, api_secret, "Example 1.0") # 메시지 발송 요청 status = cool.send(to, message, sender) # 리턴값 출력 print status # 리턴값이 False이면 오류 if status == False: print "ERROR: %s" % cool.get_error()
def main(): # API Credential 정보 # https://www.coolsms.co.kr/index.php?mid=service_setup&act=dispSmsconfigCredentials api_key = 'NCS52A57F48C3D32' api_secret = '5AC44E03CE8E7212D9D1AD9091FA9966' # 수신번호 to = '01000000000' # 발신번호 # 2015/10/16 발신번호 등록제 시행에 따라 사전에 등록된 발신번호만 허용 # http://www.coolsms.co.kr/index.php?mid=service_setup&act=dispSmsconfigSenderNumbers sender = '01012345678' # 메시지 내용 message = '테스트 메시지' # API Key, API Secret, App Version cool = coolsms.rest(api_key, api_secret, 'Example 1.0') # 메시지 발송 요청 status = cool.send(to,message,sender,datetime='20140213140000') # 리턴값 출력 print status # 리턴값이 False이면 오류 if status == False: print "ERROR: %s" % cool.get_error()
def main(): api_key = 'NCS52A57F48C3D32' api_secret = '5AC44E03CE8E7212D9D1AD9091FA9966' to = '01000000000' sender = '01012345678' message = '테스트 메시지' cool = coolsms.rest(api_key, api_secret) status = cool.send(to,message,sender) print status
def main(): api_key = 'NCS52A57F48C3D32' api_secret = '5AC44E03CE8E7212D9D1AD9091FA9966' to = '01000000000,01011111111' # <--- input comma-separated numbers sender = '01012345678' message = '테스트 메시지' cool = coolsms.rest(api_key, api_secret) status = cool.send(to,message,sender) print status
def main(): api_key = 'NCS52A57F48C3D32' api_secret = '5AC44E03CE8E7212D9D1AD9091FA9966' to = '01000000000' sender = '01012345678' message = 'MMS 2,000 바이트까지 입력가능합니다' cool = coolsms.rest(api_key, api_secret) status = cool.send(to,message,sender,mtype='mms',subject='MMS 제목(40바이트)',image='test.jpg') if status == False: print cool.get_error() print status
def main(): api_key = 'NCS52A57F48C3D32' api_secret = '5AC44E03CE8E7212D9D1AD9091FA9966' to = '01000000000' sender = '01012345678' message = '테스트 메시지' cool = coolsms.rest(api_key, api_secret, 'Example 1.0') status = cool.send(to,message,sender,country='81') # <---- 국가번호 입력 print status if status == False: print "ERROR: %s" % cool.get_error()
def main(): api_key = 'NCS52A57F48C3D32' api_secret = '5AC44E03CE8E7212D9D1AD9091FA9966' to = '01000000000,01011111111' # <--- input comma-separated numbers sender = '01012345678' message = '테스트 메시지' data = [ {"to":"01000000001", "text":"Hello A"}, {"to":"01000000002", "text":"Hello B"} ] extension = json.dumps(data) cool = coolsms.rest(api_key, api_secret, 'Example 1.0') status = cool.send(to,message,sender,extension=extension) print status
def main(): api_key = 'NCS52A57F48C3D32' api_secret = '5AC44E03CE8E7212D9D1AD9091FA9966' to = '01000000000,01011111111' # <--- input comma-separated numbers sender = '01012345678' message = '테스트 메시지' cool = coolsms.rest(api_key, api_secret, 'Example 1.0') status = cool.send(to,message,sender) print status if status == False: print "ERROR: %s" % cool.get_error()
def main(): api_key = 'NCS52A57F48C3D32' api_secret = '5AC44E03CE8E7212D9D1AD9091FA9966' cool = coolsms.rest(api_key, api_secret) cash, point = cool.balance() print "cash : %u, point : %u" % (cash, point)
def main(): api_key = 'NCS52A57F48C3D32' api_secret = '5AC44E03CE8E7212D9D1AD9091FA9966' cool = coolsms.rest(api_key, api_secret) status = cool.cancel(mid='R1M52D35EAF44960') print status
def __get_api__(self): api_key, api_secret = self.get_credential() return coolsms.rest(api_key, api_secret, srk=None, test=self.test)
def main(): api_key = "NCS52A57F48C3D32" api_secret = "5AC44E03CE8E7212D9D1AD9091FA9966" cool = coolsms.rest(api_key, api_secret) status = cool.status() print status
def main(): api_key = 'NCS52A57F48C3D32' api_secret = '5AC44E03CE8E7212D9D1AD9091FA9966' cool = coolsms.rest(api_key, api_secret) status = cool.line_status() print status
def main(): api_key = 'NCS52A57F48C3D32' api_secret = '5AC44E03CE8E7212D9D1AD9091FA9966' cool = coolsms.rest(api_key, api_secret) status = cool.status(mid='R2M5301BF9F6113C') print status