Infobank OMNI API
  • Infobank OMNI API
  • 시작하기
  • API Reference
    • 개요
    • 인증
    • 관리
      • 메시지 폼
      • 이미지 파일
    • 전송(Simple)
      • 문자
      • 국제메시지
      • RCS
      • 카카오 비즈메시지
    • 전송(통합메시지)
    • 리포트
      • Polling
      • Webhook
      • 조회
    • 코드표
  • SUPPORT
    • SDKs
    • Tools
    • FAQ
    • 기술 문의
  • 개정 이력
Powered by GitBook

Copyright Infobank Corp. ALL right reserverd

On this page
  • 국제메시지 전송
  • Request
  • Response
  • Reference
  1. API Reference
  2. 전송(Simple)

국제메시지

국제 문자(SMS) 메시지 발송 규격입니다.

Last updated 15 days ago

  • 장문 메시지를 보낼 경우 로 전송됩니다.

  • 요청 시 정보를 수신 받을 수 있습니다. (영업담당자 문의)

  • 상세 Response 내용은 를 참조해주시기 바랍니다.

수신번호 입력 시 국제수신번호규격()으로 전달 해야 합니다.

국제메시지 전송

POST /v1/send/international

Request

Header

Name
Type
Description

Authorization

String

schema + “ “ + token

Content-Type

String

application/json

Accept

String

application/json

Body

Name
Type
Required
Description

from

String

YES

발신번호 (형식, 01012345678)

to

String

YES

수신번호 (국제형식, +821000000000)

text

String(2000)

YES

메시지 내용

ref

String(200)

NO

curl -X POST https://omni.ibapi.kr/v1/send/international \
-H "content-type: application/json" \
-H "Accept: application/json" \
-H "Authorization:Bearer 발급받은 토큰" \
-d '{"from":"발신번호","text":"메시지 내용", "to":"수신번호(국제형식)", "ref":"참조필드"}' 
import java.io.*;
import okhttp3.*;
public class Main {
  public static void main(String []args) throws IOException{
    OkHttpClient client = new OkHttpClient().newBuilder()
      .build();
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"from\":\"발신번호\",\"text\":\"메시지 내용\", \"to\":\"수신번호(국제형식)\", \"ref\":\"참조필드\"}");
    Request request = new Request.Builder()
      .url("https://omni.ibapi.kr/v1/send/international")
      .method("POST", body)
      .addHeader("Content-Type", "application/json")
      .addHeader("Accept", "application/json")
      .addHeader("Authorization", "Bearer 발급받은 토큰")
      .build();
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
  }
}
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://omni.ibapi.kr/v1/send/international"
  method := "POST"

  payload := strings.NewReader(`{"from":"발신번호","text":"메시지 내용", "to":"수신번호(국제형식)", "ref":"참조필드"}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("Accept", "application/json")
  req.Header.Add("Authorization", "Bearer 발급받은 토큰")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://omni.ibapi.kr/v1/send/international',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{"from":"발신번호","text":"메시지 내용", "to":"수신번호(국제형식)", "ref":"참조필드"}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Accept: application/json',
    'Authorization: Bearer 발급받은 토큰'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://omni.ibapi.kr/v1/send/international',
  'headers': {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'Authorization': 'Bearer 발급받은 토큰'
  },
  body: JSON.stringify({
    "from": "발신번호",
    "text": "메시지 내용",
    "to": "수신번호(국제형식)",
    "ref": "참조필드"
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://omni.ibapi.kr/v1/send/international");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer 발급받은 토큰");
var content = new StringContent("{\"from\":\"발신번호\",\"text\":\"메시지 내용\", \"to\":\"수신번호(국제형식)\", \"ref\":\"참조필드\"}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Accept", "application/json");
myHeaders.append("Authorization", "Bearer 발급받은 토큰");

var raw = JSON.stringify({
  "from": "발신번호",
  "text": "메시지 내용",
  "to": "수신번호(국제형식)",
  "ref": "참조필드"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://omni.ibapi.kr/v1/send/international", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import http.client
import json

conn = http.client.HTTPSConnection("omni.ibapi.kr")
payload = json.dumps({
  "from": "발신번호",
  "text": "메시지 내용",
  "to": "수신번호(국제형식)",
  "ref": "참조필드"
})
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer 발급받은 토큰'
}
conn.request("POST", "/v1/send/international", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
require "uri"
require "json"
require "net/http"

url = URI("https://omni.ibapi.kr/v1/send/international")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Accept"] = "application/json"
request["Authorization"] = "Bearer 발급받은 토큰"
request.body = JSON.dump({
  "from": "발신번호",
  "text": "메시지 내용",
  "to": "수신번호(국제형식)",
  "ref": "참조필드"
})

response = https.request(request)
puts response.read_body

Response

Header

Name
Type
Description

Content-Type

String

application/json

Body

Name
Type
Description

code

String(4)

API 호출 결과 코드

result

String

API 호출 결과 설명

msgKey

String

메시지 키

ref

String(200)

참조필드(요청 시 입력한 데이터)

{
    "code": "A000",
    "result": "Success",
    "msgKey": "발급된 메시지 키",
    "ref": "요청시 입력한 데이터"  
}
{
    "code": "A010",
    "result": "Cannot parse JSON"
} 
{
    "code": "A001",
    "result": "Expired token"
}
{
    "code": "A020",
    "result": "Rate limit exceeded"
}
{
    "code": "A999",
    "result": "Unknown error"
}

Reference

Concatenated SMS

Concatenated SMS

해외는 국가별 통신 규격에 따라 SMS 길이만 지원하는 경우도 있고 국내의 LMS와 비슷하게 긴 문자 메시지를 지원하기도 합니다. 이를 Concatenated SMS라고 칭하며 긴 문자를 전송하시는 경우 최대 전송 가능 길이는 일반적으로 다음과 같으며 요금은 기본 SMS 길이의 배수로 과금 됩니다.

메시지 길이가 기본 메시지 길이인 160자(현지어 70자)를 초과하는 경우

  • 알파벳/숫자 전송 시 153자 단위로 과금 : 153자 * 5건 = 최대 765자

  • 현지어 전송 시 67자 단위로 과금 : 67자 * 5건 = 최대 335자

메시지 서명

메시지 서명

해외로 메시지를 전송하는 경우 타 서비스 사칭이나 스팸 메시지를 차단하기 위해 메시지 내용에 메시지 전송자의 서비스명이나 회사명을 식별할 수 있는 내용을 반드시 삽입하도록 하는 경우가 있습니다. 이를 ‘메시지 서명’이라고 하며 사전 등록이 필요합니다. 중국이 대표적인 국가이며 【INFO中国】과 같은 형태로 문자 내용 맨 앞에 삽입해야 합니다.

Sender ID

Sender ID

메시지 발신자 정보로서 단말기에서 메시지 수신 시 보내는 사람 영역에 표현되는 숫자/문자를 Sender ID라고 합니다. 해외 일부 국가/통신사의 경우 Sender ID로 '15882460'과 같은 숫자 뿐만 아니라 'Korea'와 같은 문자열을 사용할 수 있습니다. 타 서비스를 사칭하거나 스팸 메시지를 차단하기 위해 기업이나 서비스 고유의 문자열을 해외 통신사에 미리 등록하고 메시지를 전송하도록 하는 경우가 있으며, 대표적인 예로 인도네시아, 인도, 필리핀, 태국 등이 있습니다. 상세한 정보는 영업 담당자를 통해 확인 가능하며 통상 등록에 2주~4주 정도 소요됩니다.

DLR(Delivery Report)

DLR(Delivery Report)

실제 단말기 전송 결과 입니다. 국내 리포트와 동일한 개념이지만 국제메시지의 경우 국제 중계사 접수 결과를 리포트로 처리하고 있습니다.(과금 기준) 요청에 의해 수신 가능하며 메시지 1건 당 기존 리포트(접수 결과)와 DLR(전송 결과) 각 1건 씩 총2건이 수집 됩니다.

E.164
Concatenated SMS(분할 전송)
DLR
코드표