Skip to content

Commit 334c8c7

Browse files
committed
중복 수신번호 허용 예제 추가
1 parent 4967868 commit 334c8c7

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

examples/sms/allow_duplicates.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import json
2+
import sys
3+
sys.path.append('../../lib')
4+
import message
5+
6+
# 한번 요청으로 1만건의 메시지 발송이 가능합니다.
7+
if __name__ == '__main__':
8+
data = {
9+
'allowDuplicates': True, # 수신번호 중복 입력을 허용합니다.
10+
'messages': [
11+
{
12+
'to': '01000000001',
13+
'from': '029302266',
14+
'text': '동일한 수신번호로 발송 #1'
15+
},
16+
{
17+
'to': '01000000001',
18+
'from': '029302266',
19+
'text': '동일한 수신번호로 발송 #2' # 동일한 내용 입력 시 수신된 문자는 하나로 보여질 수 있습니다.
20+
},
21+
# ...
22+
# 1만건까지 추가 가능
23+
]
24+
}
25+
res = message.sendMany(data)
26+
print(json.dumps(res.json(), indent=2, ensure_ascii=False))

0 commit comments

Comments
 (0)