카카오 알림톡 발송 #
카카오 알림톡 발송 API이며, 최대 10건 까지 한번에 발송 가능합니다.
Request #
URL
POST /msg/v1.2/alimtalk HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
Host: api.msghub.uplus.co.kr
Header
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | String | true | 사용자 인증 토큰 |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| clickUrlYn | String | false | 단축URL 사용여부 |
| filterYn | String | false | 필터링 여부 |
| filterGrpLst | ArrayList | false | 필터그룹 |
| callback | String | true | 발신번호 |
| campaignId | String | false | 캠페인 ID |
| agency | Object | false | 대행사/재판매 사업자 발송정보 (일반사업자는 미사용) |
resvYn | String | false | 예약발송 여부 |
| resvReqDt | String | false | 예약발송 일시(yyyy-MM-dd hh:mm) |
| deptCode | String | false | 부서코드 |
| title | String | false | 알림톡 강조표기 제목, 최대 50 Byte * 템플릿 강조유형 중 강조표기형 일때만 사용 |
| msg | String | true | 메시지 내용, 최대 1000자 |
| kkoChId | String | true | 카카오채널ID |
| tmpltCode | String | true | 템플릿 코드 |
| service | integer | false | 서비스 번호 |
| buttons | List<LMKakaoButton> | false | 버튼 목록 |
| recvInfoLst | List<RecvInfo> | true | 발송 정보 목록(최대 10건 발송가능) |
| fbInfoLst | List<FbInfo> | false | fallback 정보 목록 |
| groupKey | String | false | 그룹 템플릿 발송 시 그룹키 |
| itemHeader | String | false | 아이템리스트 헤더 |
| itemHighlightTitle | String | false | 아이템리스트 요약정보 |
| itemHighlightDescription | String | false | 아이템리스트 요약내용 |
| item | Object | false | 아이템리스트 정보 |
LMKakaoButton 버튼
| Name | Type | Required | Description |
|---|---|---|---|
| name | String | true | 버튼이름 |
| linkType | String | true | 버튼타입(*하단 참조) |
| linkMo | String | false | mobile 환경에서 버튼 클릭 시 이동할 url, 최대 255 Byte |
| linkPc | String | false | pc 환경에서 버튼 클릭 시 이동할 url, 최대 255 Byte |
| linkAnd | String | false | mobile android 환경에서 버튼 클릭 시 실행할 application custom scheme |
| linkIos | String | false | mobile ios 환경에서 버튼 클릭 시 실행할 application custom scheme |
item 객체
| Name | Type | Required | Description |
|---|---|---|---|
| list | List | true | 아이템리스트, 최소 2개, 최대 10개까지 가능 |
| list[].title | String | true | 아이템리스트 타이틀, 최대 6자 |
| list[].description | String | true | 아이템리스트 설명, 최대 23자 |
| summary | Object | false | 아이템리스트 설명 |
| summary.title | String | true | 타이틀 |
| summary.description | String | false | 설명 (변수 및 화폐 단위, 숫자, 쉼표, 마침표만 사용 가능), 최대 14자 |
참고
버튼타입
WL : linkMo 필수, linkPc 옵션
AL : linkIos, linkAnd, linkMo, linkPc 중 2가지 필수 입력
BK : 해당 버튼 텍스트 전송
MD : 해당 버튼 텍스트 + 메시지 본문 전송
BC : 상담톡 전환
BT : 봇 전환
DS : 메시지 내 송장번호 이용한 배송조회페이지로 연결 (quickReplies사용불가)
AC : 채널추가 -광고추가형, 복합형템플릿에서만 사용가능 -버튼단톡 또는 최상단(첫번째버튼)에만 추가가능 (quickReplies사용불가)
Response #
스키마를 참조하세요.
Sample #
Curl (아이템리스트형 이외의 템플릿)
curl -X POST "https://api.msghub.uplus.co.kr/msg/v1.2/alimtalk"
-H "accept: */*"
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ..."
-H "Content-Type: application/json"
-d '{
"clickUrlYn":"n",
"filterYn":"y",
"filterGrpLst":[]
"callback": "0212341234",
"campaignId": "캠페인ID",
"agency":{
"kisaOrigCode": "재판매사 KISA 최초식별코드",
"rcsAgencyId": "재판매사 RCS Agency ID",
"rcsAgencyKey": "재판매사 RCS Agency Key"
},
"resvYn": "Y",
"resvReqDt": "2023-01-13 13:15",
"deptCode": "부서코드",
"title":"제목",
"msg": "#{name}님, 금일 #{time}시 세일 정보 안내드립니다.",
"kkoChId": "@카카오채널ID",
"tmpltCode":"템플릿코드",
"service":"서비스번호",
"buttons": [
{
"name": "연결하기",
"linkType": "WL",
"linkMo": "https://",
"linkPc": "https://",
"linkAnd": "https://",
"linkIos": "https://"
}
],
"recvInfoLst": [
{
"cliKey": "cliKey1",
"phone": "01012341234",
"mergeData": {
"name": "홍길동",
"time": "3시"
},
"userCustomFields": {
"orderId": "Y_ORD12345",
"customerName": "홍길동",
"amount": 10000
}
},
{
"cliKey": "cliKey2",
"phone": "01012341235",
"mergeData": {
"name": "김길순",
"time": "3시"
},
"userCustomFields": {
"orderId": "Y_ORD6789",
"customerName": "김철수",
"amount": 10000
}
}
],
"fbInfoLst": [
{
"ch": "SMS",
"title": "제목",
"msg": "SMS 메시지 내용",
"fileId": "test01"
}
],
"groupKey":"grpxrss'
}
Curl (아이템리스트형 템플릿)
curl -X POST "https://api.msghub.uplus.co.kr/msg/v1.2/alimtalk"
-H "accept: */*"
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ..."
-H "Content-Type: application/json"
-d '{
"clickUrlYn":"n",
"filterYn":"y",
"filterGrpLst":[]
"callback": "0212341234",
"campaignId": "캠페인ID",
"agency":{
"kisaOrigCode": "재판매사 KISA 최초식별코드",
"rcsAgencyId": "재판매사 RCS Agency ID",
"rcsAgencyKey": "재판매사 RCS Agency Key"
},
"resvYn": "Y",
"resvReqDt": "2023-01-13 13:15",
"deptCode": "부서코드",
"title":"제목",
"msg": "#{name}님, 금일 #{time}시 세일 정보 안내드립니다.",
"kkoChId": "@카카오채널ID",
"tmpltCode":"템플릿코드",
"service":"서비스번호",
"item": {
"list": [
{
"title": "test01",
"description": "test01"
},
{
"title": "test02",
"description": "test02"
}
],
"summary": {
"title": "테스트",
"description": "1,000,000원"
}
},
"itemHeader":"헤더",
"itemHighlightTitle": "타이틀",
"itemHighlightDescription": "설명",
"buttons": [
{
"name": "연결하기",
"linkType": "WL",
"linkMo": "https://",
"linkPc": "https://",
"linkAnd": "https://",
"linkIos": "https://"
}
],
"recvInfoLst": [
{
"cliKey": "cliKey1",
"phone": "01012341234",
"mergeData": {
"name": "홍길동",
"time": "3시"
},
"userCustomFields": {
"orderId": "Y_ORD12345",
"customerName": "홍길동",
"amount": 10000
}
},
{
"cliKey": "cliKey2",
"phone": "01012341235",
"mergeData": {
"name": "김길순",
"time": "3시"
},
"userCustomFields": {
"orderId": "Y_ORD6789",
"customerName": "김철수",
"amount": 10000
}
}
],
"fbInfoLst": [
{
"ch": "SMS",
"title": "제목",
"msg": "SMS 메시지 내용",
"fileId": "test01"
}
],
"groupKey":"grpxrss'
}
Response
{
"code": "10000",
"message": "성공",
"data": [
{
"cliKey": "cliKey1",
"msgKey": "tw9Tomlcen.6bTb0O",
"phone": "01012341234",
"code": "10000",
"message": "성공"
},
{
"cliKey": "cliKey2",
"msgKey": "tw9Tomlcen.6bTb0O",
"phone": "01012341234",
"code": "10000",
"message": "성공"
}
]
}
참고
결과 코드 참고
카카오 친구톡 발송 #
카카오 친구톡 발송 API이며, 최대 10건 까지 한번에 발송 가능합니다.
Request #
URL
POST /msg/v1.2/friendtalk HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
Host: api.msghub.uplus.co.kr
Header
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | String | true | 사용자 인증 토큰 |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| clickUrlYn | String | false | 단축URL 사용여부 |
| filterYn | String | false | 필터링 여부 |
| filterGrpLst | ArrayList<> | false | 필터그룹 |
| callback | String | true | 발신번호 |
| campaignId | String | false | 캠페인 ID |
| agency | Object | false | 대행사/재판매 사업자 발송정보 (일반사업자는 미사용) |
resvYn | String | false | 예약발송 여부 |
| resvReqDt | String | false | 예약발송 일시(yyyy-MM-dd hh:mm) |
| deptCode | String | false | 부서코드 |
| wideImageYn | String | true | 와이드 이미지 여부(Y/N) |
| fileId | String | false | 파일 아이디 |
| adFlag | String | true | 광고 표기 여부(Y/N) |
| msg | String | true | *메시지 내용 |
| image | Image | false | 이미지 |
| kkoChId | String | true | 카카오톡 채널ID |
| buttons | List<LMKakaoButton> | false | 버튼 목록 |
| recvInfoLst | List<RecvInfo> | true | 발송 정보 목록(최대 10건 발송가능) |
| fbInfoLst | List<FbInfo> | false | fallback 정보 목록 |
참고
메시지 길이 체크
– 이미지 없는 일반 메시지 : 최대 1000자
– 이미지가 있는 경우 : 최대 400자
– 와이드 이미지일 경우 : 최대 76자
Image 이미지
| Name | Type | Required | Description |
|---|---|---|---|
| imgUrl | String | true | 이미지 URL |
| imgLink | String | false | 이미지 링크 |
LMKakaoButton 버튼
| Name | Type | Required | Description |
|---|---|---|---|
| name | String | true | 버튼이름 |
| linkType | String | true | 버튼타입(*하단 참조) |
| linkMo | String | false | mobile 환경에서 버튼 클릭 시 이동할 url, 최대 255 Byte |
| linkPc | String | false | pc 환경에서 버튼 클릭 시 이동할 url, 최대 255 Byte |
| linkAnd | String | false | mobile android 환경에서 버튼 클릭 시 실행할 application custom scheme |
| linkIos | String | false | mobile ios 환경에서 버튼 클릭 시 실행할 application custom scheme |
참고
버튼타입
WL : linkMo 필수, linkPc 옵션
AL : linkIos, linkAnd, linkMo 중 2가지 필수 입력, linkPc
BK : 해당 버튼 텍스트 전송
MD : 해당 버튼 텍스트 + 메시지 본문 전송
BC : 상담톡 전환
BT : 봇 전환
DS : 메시지 내 송장번호 이용한 배송조회페이지로 연결 (quickReplies사용불가)
AC : 채널추가 -광고추가형, 복합형템플릿에서만 사용가능 -버튼단톡 또는 최상단(첫번째버튼)에만 추가가능 (quickReplies사용불가)》
Response #
스키마를 참조하세요.
Sample #
Curl
curl -X POST "https://api.msghub.uplus.co.kr/msg/v1.2/friendtalk"
-H "accept: */*"
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ..."
-H "Content-Type: application/json"
-d '
{
"clickUrlYn":"n",
"filterYn":"y",
"filterGrpLst":[]
"callback": "0212341234",
"campaignId": "캠페인ID",
"agency":{
"kisaOrigCode": "재판매사 KISA 최초식별코드",
"rcsAgencyId": "재판매사 RCS Agency ID",
"rcsAgencyKey": "재판매사 RCS Agency Key"
},
"resvYn": "Y",
"resvReqDt": "2023-01-13 13:15",
"deptCode": "부서코드",
"wideImageYn": "N",
"fileId": "파일ID",
"adFlag": "N",
"msg": "#{name}님, 금일 #{time}시 세일 정보 안내드립니다.",
"kkoChId": "@카카오채널ID",
"buttons": [
{
"name": "연결하기",
"linkType": "WL",
"linkMo": "https://",
"linkPc": "https://",
"linkAnd": "https://",
"linkIos": "https://"
}
],
"recvInfoLst": [
{
"cliKey": "cliKey1",
"phone": "01012341234",
"mergeData": {
"name": "홍길동",
"time": "3시"
},
"userCustomFields": {
"orderId": "Y_ORD12345",
"customerName": "홍길동",
"amount": 10000
}
},
{
"cliKey": "cliKey2",
"phone": "01012341235",
"mergeData": {
"name": "김길순",
"time": "3시"
},
"userCustomFields": {
"orderId": "Y_ORD6789",
"customerName": "김철수",
"amount": 10000
}
}
],
"fbInfoLst": [
{
"ch": "SMS",
"title": "제목",
"msg": "SMS 메시지 내용",
"fileId": "test01"
}
]
}'
Response
{
"code": "10000",
"message": "성공",
"data": [
{
"cliKey": "cliKey1",
"msgKey": "tw9Tomlcen.6bTb0O",
"phone": "01012341234",
"code": "10000",
"message": "성공"
},
{
"cliKey": "cliKey2",
"msgKey": "tw9Tomlcen.6bTb0O",
"phone": "01012341234",
"code": "10000",
"message": "성공"
}
]
}
참고
결과 코드 참고