Last active
April 11, 2018 06:55
-
-
Save Baw-Appie/6d6960ba65293dfa8a094571997522bd to your computer and use it in GitHub Desktop.
닷네임 코리아 SMS 호스팅 REST API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$str = array(); | |
$str['data'] = json_encode(array( | |
'id' => 'ID', | |
'pw' => hash("sha256", 'Password'), | |
'code' => '5325', | |
'type' => "A", | |
'caller' => "PHONE NUMBER", | |
'toll' => "PHONE NUMBER", | |
'html' => 1 | |
)); | |
$str['msg'] = "TEST"; | |
$cu = curl_init('http://smsapi.dotname.co.kr/index.php'); | |
curl_setopt($cu, CURLOPT_SSL_VERIFYHOST, 0); | |
curl_setopt($cu, CURLOPT_SSL_VERIFYPEER, 0); | |
curl_setopt($cu, CURLOPT_POST, 1); | |
curl_setopt($cu, CURLOPT_POSTFIELDS, $str); | |
curl_setopt($cu, CURLOPT_TIMEOUT, 100); | |
echo curl_exec($cu); | |
curl_close($cu); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@1 | |
발송성공 (정상적으로 통신사 요청완료) | |
#1 | |
ID랑 비밀번호가 일치하지 않음. | |
#2 | |
고객 정보를 불러오지 못했습니다. 닷네임코리아에 문의 해주세요. | |
#3 | |
허용되지 않은 IP 입니다. SMS 관리자를 통해 IP를 등록해 주시기 바랍니다. | |
#4 | |
SMS 관리자 페이지를 통하여 API 허용을 설정해주세요. | |
#5 | |
발신자 전화번호는 숫자 데이터만 가능합니다. | |
#6 | |
수신자 전화번호는 숫자 데이터만 가능합니다. | |
#7 | |
메세지 데이터가 없습니다. | |
#8 | |
타입값이 잘못 되었습니다. | |
#9 | |
A 타입에는 메세지 80 byte를 넘을 수 없습니다. 타입값을 확인하세요. | |
#10 | |
포인트 차감 에러 닷네임에 문의주세요. | |
#11 | |
고객 SMS_NUMBER 정보를 가져오지 못하였습니다. 닷네임코리아에 문의 해주세요. | |
#12 | |
포인트 부족 | |
#13 | |
날짜 형식 오류 | |
#14 | |
예약전송할 날짜 데이터가 없습니다. | |
#15 | |
이미지 파일이 존재하지 않거나, sms 서버로 복사 시도에 실패 하였습니다. | |
#16 | |
mms 이미지 파일 용량은 1MB 이하만 가능합니다. | |
#17 | |
SMS 관리자 페이지를 통하여 웹방식 허용을 설정해주세요. | |
#18 | |
메세지는 2000 byte를 넘을 수 없습니다. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment