가비아의 개발 노하우로
API를 제공합니다

API 개발 가이드

  • API 사용 첫 단계
  • 문자서비스를 이용하기 전, 발송 IP와 발신 번호 등록 및 API Key를 확인하세요.

API 연동 방법 선택

연동 방법

‘가비아 메시징(SMS) 서비스는 다양한 API 프로토콜을 제공하기 위해 ‘XML RPC’ 와 ‘REST API’, 두 가지 API 연동 방식을 지원합니다.

1. XML RPC(구 API)

  • - 단문/장문/포토 발송 가능
  • - 제공 언어: JSP, PHP, ASP, ASP.NET
  • - 모듈 및 이용 가이드 다운로드

XML RPC 모듈 다운로드설치 및 이용 매뉴얼 다운로드

2. REST API

  • - 단문/장문/포토 발송 가능
  • - 제공 언어: PHP, JAVA, PYTHON, NODE, RUBY, cURL, GO
  • - 하단의 이용 매뉴얼 참고
  • 사용자 인증
  • SMS ID와 API Key로 토큰을 발행해 사용자를 인증합니다.
  • POST https://sms.gabia.com/oauth/token
  • HEADERS
  • Content-Type application/x-www-form-urlencoded
    Authorization Basic base64encode(SMS_ID:API_KEY)
    (예) Basic c1hY3JvY2sZDAwNzA2YzJlMTdjZjlkMz1234hlM2U5YjQ=
  • BODY
  • grant_type client_credentials
  • <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
    CURLOPT_URL => "https://sms.gabia.com/oauth/token",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => false,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => "grant_type=client_credentials",
    CURLOPT_HTTPHEADER => array(
      "Content-Type: application/x-www-form-urlencoded",
      "Authorization: Basic c1hY3JvY2sZDAwNzA2YzJlMTdjZjlkMz1234hlM2U5YjQ="
    ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
    echo "cURL Error #:" . $err;
    } else {
    echo $response;
    } ?>
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
    RequestBody body = RequestBody.create(mediaType, "grant_type=client_credentials");
    Request request = new Request.Builder()
    .url("https://sms.gabia.com/oauth/token")
    .post(body)
    .addHeader("Content-Type", "application/x-www-form-urlencoded")
    .addHeader("Authorization", "Basic c1hY3JvY2sZDAwNzA2YzJlMTdjZjlkMz1234hlM2U5YjQ=")
    .addHeader("cache-control", "no-cache")
    .build();
    
    Response response = client.newCall(request).execute();
    
    import requests
    url = 'https://sms.gabia.com/oauth/token'
    payload = 'grant_type=client_credentials'
    headers = {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Authorization': 'Basic c1hY3JvY2sZDAwNzA2YzJlMTdjZjlkMz1234hlM2U5YjQ='
    }
    response = requests.request('POST', url, headers = headers, data = payload, allow_redirects=False, timeout=undefined, allow_redirects=false)
    print(response.text)
    var https = require('https');
    
    var qs = require('querystring');
    
    var options = {
    'method': 'POST',
    'hostname': 'sms.gabia.com',
    'path': '/oauth/token',
    'headers': {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': 'Basic c1hY3JvY2sZDAwNzA2YzJlMTdjZjlkMz1234hlM2U5YjQ='
    }
    };
    
    var req = https.request(options, function (res) {
    var chunks = [];
    
    res.on("data", function (chunk) {
      chunks.push(chunk);
    });
    
    res.on("end", function (chunk) {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
    
    res.on("error", function (error) {
      console.error(error);
    });
    });
    
    var postData = qs.stringify({
    'grant_type': 'client_credentials'
    });
    
    req.write(postData);
    
    req.end();
    require "uri"
    require "net/http"
    
    url = URI("https://sms.gabia.com/oauth/token")
    
    https = Net::HTTP.new(url.host, url.port)
    https.use_ssl = true
    
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = "application/x-www-form-urlencoded"
    request["Authorization"] = "Basic c1hY3JvY2sZDAwNzA2YzJlMTdjZjlkMz1234hlM2U5YjQ="
    request.body = "grant_type=client_credentials"
    
    response = https.request(request)
    puts response.read_body
    curl --location --request POST "https://sms.gabia.com/oauth/token" \
    --header "Content-Type: application/x-www-form-urlencoded" \
    --header "Authorization: Basic c1hY3JvY2sZDAwNzA2YzJlMTdjZjlkMz1234hlM2U5YjQ=" \
    --data "grant_type=client_credentials"
    package main
    
    import (
    "fmt"
    "strings"
    "os"
    "path/filepath"
    "net/http"
    "io/ioutil"
    )
    
    func main() {
    
    url := "https://sms.gabia.com/oauth/token"
    method := "POST"
    
    payload := strings.NewReader("grant_type=client_credentials")
    
    client := &http.Client {
      CheckRedirect: func(req *http.Request, via []*http.Request) error {
        return http.ErrUseLastResponse
      },
    }
    req, err := http.NewRequest(method, url, payload)
    
    if err != nil {
      fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
    req.Header.Add("Authorization", "Basic c1hY3JvY2sZDAwNzA2YzJlMTdjZjlkMz1234hlM2U5YjQ=")
    
    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)
    
    fmt.Println(string(body))
    }
  • 단문(SMS) 발송 하기
  • 단문으로 문자를 발송할 수 있습니다. 90byte까지 단문으로 발송되며, 90byte가 넘는 경우에는 단문으로 잘려 발송됩니다.
  • POST https://sms.gabia.com/api/send/sms
  • HEADERS
  • Content-Type application/x-www-form-urlencoded
    Authorization Basic base64encode(SMS_ID:ACCESS_TOKEN)
    (예) Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc=
  • BODY
  • phone 01000000000
    callback 15444370
    message SMS TEST MESSAGE
    refkey RESTAPITEST1549847130
    Any unique string to find your result of send after
  • <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
    CURLOPT_URL => "https://sms.gabia.com/api/send/sms",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => false,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => "phone=01000000000&callback=15444370&message=SMS TEST MESSAGE&refkey=[[RESTAPITEST1549847130]]",
    CURLOPT_HTTPHEADER => array(
      "Content-Type: application/x-www-form-urlencoded",
      "Authorization: Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc="
    ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
    echo "cURL Error #:" . $err;
    } else {
    echo $response;
    } ?>
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
    RequestBody body = RequestBody.create(mediaType, "phone=01000000000&callback=15444370&message=SMS TEST MESSAGE&refkey=RESTAPITEST1547509987");
    Request request = new Request.Builder()
    .url("https://sms.gabia.com/api/send/sms")
    .post(body)
    .addHeader("Content-Type", "application/x-www-form-urlencoded")
    .addHeader("Authorization", "Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc=")
    .addHeader("cache-control", "no-cache")
    .build();
    
    Response response = client.newCall(request).execute();
    
    import requests
    url = 'https://sms.gabia.com/api/send/sms'
    payload = 'phone=01000000000&callback=15444370&message=SMS TEST MESSAGE&refkey=[[RESTAPITEST1549847130]]'
    headers = {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Authorization': 'Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc='
    }
    response = requests.request('POST', url, headers = headers, data = payload, allow_redirects=False, timeout=undefined, allow_redirects=false)
    print(response.text)
    var https = require('https');
    
    var qs = require('querystring');
    
    var options = {
    'method': 'POST',
    'hostname': 'sms.gabia.com',
    'path': '/api/send/sms',
    'headers': {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': 'Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc='
    }
    };
    
    var req = https.request(options, function (res) {
    var chunks = [];
    
    res.on("data", function (chunk) {
      chunks.push(chunk);
    });
    
    res.on("end", function (chunk) {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
    
    res.on("error", function (error) {
      console.error(error);
    });
    });
    
    var postData = qs.stringify({
    'phone': '01000000000',
    'callback': '15444370',
    'message': 'SMS TEST MESSAGE',
    'refkey': 'RESTAPITEST1547771538'
    });
    
    req.write(postData);
    
    req.end();
    require "uri"
    require "net/http"
    
    url = URI("https://sms.gabia.com/api/send/sms")
    
    https = Net::HTTP.new(url.host, url.port)
    https.use_ssl = true
    
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = "application/x-www-form-urlencoded"
    request["Authorization"] = "Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc="
    request.body = "phone=01000000000&callback=15444370&message=SMS TEST MESSAGE&refkey=[[RESTAPITEST1549847130]]"
    
    response = https.request(request)
    puts response.read_body
    curl --location --request POST "https://sms.gabia.com/api/send/sms" \
    --header "Content-Type: application/x-www-form-urlencoded" \
    --header "Authorization: Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc=" \
    --data "phone=01000000000&callback=15444370&message=SMS TEST MESSAGE&refkey=[[RESTAPITEST1549847130]]"
    package main
    
    import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
    )
    
    func main() {
    
    url := "https://sms.gabia.com/api/send/sms"
    method := "POST"
    
    payload := strings.NewReader("phone=01000000000&callback=15444370&message=SMS TEST MESSAGE&refkey=[[RESTAPITEST1549847130]]")
    
    client := &http.Client {
      CheckRedirect: func(req *http.Request, via []*http.Request) error {
        return http.ErrUseLastResponse
      },
    }
    req, err := http.NewRequest(method, url, payload)
    
    if err != nil {
      fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
    req.Header.Add("Authorization", "Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc=")
    
    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)
    
    fmt.Println(string(body))
    }
  • 장문(LMS) 발송 하기
  • 장문으로 문자를 발송할 수 있습니다. 문자 내용에 제목을 추가할 수 있습니다.
  • POST https://sms.gabia.com/api/send/lms
  • HEADERS
  • Content-Type application/x-www-form-urlencoded
    Authorization Basic base64encode(SMS_ID:ACCESS_TOKEN)
    (예) Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc=
  • BODY
  • phone 01000000000
    callback 15444370
    message LMS TEST MESSAGE
    refkey RESTAPITEST1549847130
    Any unique string to find your result of send after
    subject LMS TEST SUBJECT
  • <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
    CURLOPT_URL => "https://sms.gabia.com/api/send/lms",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => false,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => "phone=01000000000&callback=15444370&message=LMS TEST MESSAGE&refkey=[[RESTAPITEST1549847130]]&subject=LMS TEST SUBJECT",
    CURLOPT_HTTPHEADER => array(
      "Content-Type: application/x-www-form-urlencoded",
      "Authorization: Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc="
    ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
    echo "cURL Error #:" . $err;
    } else {
    echo $response;
    } ?>
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
    RequestBody body = RequestBody.create(mediaType, "phone=01000000000&callback=15444370&message=LMS TEST MESSAGE&refkey=RESTAPITEST1547510001&subject=LMS TEST SUBJECT");
    Request request = new Request.Builder()
    .url("https://sms.gabia.com/api/send/lms")
    .post(body)
    .addHeader("Content-Type", "application/x-www-form-urlencoded")
    .addHeader("Authorization", "Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc=")
    .addHeader("cache-control", "no-cache")
    .build();
    
    Response response = client.newCall(request).execute();
    
    import requests
    url = 'https://sms.gabia.com/api/send/lms'
    payload = 'phone=01000000000&callback=15444370&message=LMS TEST MESSAGE&refkey=[[RESTAPITEST1549847130]]&subject=LMS TEST SUBJECT'
    headers = {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Authorization': 'Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc='
    }
    response = requests.request('POST', url, headers = headers, data = payload, allow_redirects=False, timeout=undefined, allow_redirects=false)
    print(response.text)
    var https = require('https');
    
    var qs = require('querystring');
    
    var options = {
    'method': 'POST',
    'hostname': 'sms.gabia.com',
    'path': '/api/send/lms',
    'headers': {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': 'Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc='
    }
    };
    
    var req = https.request(options, function (res) {
    var chunks = [];
    
    res.on("data", function (chunk) {
      chunks.push(chunk);
    });
    
    res.on("end", function (chunk) {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
    
    res.on("error", function (error) {
      console.error(error);
    });
    });
    
    var postData = qs.stringify({
    'phone': '01000000000',
    'callback': '15444370',
    'message': 'LMS TEST MESSAGE',
    'refkey': 'RESTAPITEST1547771538',
    'subject': 'LMS TEST SUBJECT'
    });
    
    req.write(postData);
    
    req.end();
    require "uri"
    require "net/http"
    
    url = URI("https://sms.gabia.com/api/send/lms")
    
    https = Net::HTTP.new(url.host, url.port)
    https.use_ssl = true
    
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = "application/x-www-form-urlencoded"
    request["Authorization"] = "Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc="
    request.body = "phone=01000000000&callback=15444370&message=LMS TEST MESSAGE&refkey=[[RESTAPITEST1549847130]]&subject=LMS TEST SUBJECT"
    
    response = https.request(request)
    puts response.read_body
    curl --location --request POST "https://sms.gabia.com/api/send/lms" \
    --header "Content-Type: application/x-www-form-urlencoded" \
    --header "Authorization: Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc=" \
    --data "phone=01000000000&callback=15444370&message=LMS TEST MESSAGE&refkey=[[RESTAPITEST1549847130]]&subject=LMS TEST SUBJECT"
    package main
    
    import (
    "fmt"
    "strings"
    "os"
    "path/filepath"
    "net/http"
    "io/ioutil"
    )
    
    func main() {
    
    url := "https://sms.gabia.com/api/send/lms"
    method := "POST"
    
    payload := strings.NewReader("phone=01000000000&callback=15444370&message=LMS TEST MESSAGE&refkey=[[RESTAPITEST1549847130]]&subject=LMS TEST SUBJECT")
    
    client := &http.Client {
      CheckRedirect: func(req *http.Request, via []*http.Request) error {
        return http.ErrUseLastResponse
      },
    }
    req, err := http.NewRequest(method, url, payload)
    
    if err != nil {
      fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
    req.Header.Add("Authorization", "Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc=")
    
    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)
    
    fmt.Println(string(body))
    }
  • 포토(MMS) 발송 하기
  • 단문/장문 문자에서 이미지를 첨부하여 발송할 수 있습니다. 이미지는 100kb 미만의 파일을 최대 3개까지 발송할 수 있습니다.
  • POST https://sms.gabia.com/api/send/mms
  • HEADERS
  • Authorization Basic base64encode(SMS_ID:ACCESS_TOKEN)
    (예) Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc=
  • BODY
  • phone 01000000000
    callback 15444370
    message MMS TEST MESSAGE
    refkey RESTAPITEST1549847130
    Any unique string to find your result of send after
    subject MMS TEST SUBJECT
    image_cnt 2
    Max image count is 3. images0 ~ images2
    images0 File Resource
    images1 File Resource
  • <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
    CURLOPT_URL => "https://sms.gabia.com/api/send/mms",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => false,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => array('phone' => '01000000000','callback' => '15444370','message' => 'MMS TEST MESSAGE','refkey' => 'RESTAPITEST1548722798','subject' => 'MMS TEST SUBJECT','image_cnt' => '2','images0'=> new CURLFILE(''),'images1'=> new CURLFILE('')),
    CURLOPT_HTTPHEADER => array(
      "Authorization: Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc="
    ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
    echo "cURL Error #:" . $err;
    } else {
    echo $response;
    } ?>
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW");
    RequestBody body = RequestBody.create(mediaType, "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"phone\"\r\n\r\n01000000000\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"callback\"\r\n\r\n15444370\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"message\"\r\n\r\nMMS TEST MESSAGE\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"refkey\"\r\n\r\nRESTAPITEST1547510239\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"subject\"\r\n\r\nMMS TEST SUBJECT\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"image_cnt\"\r\n\r\n2\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"images0\"; filename=\"1546577290963.jpg\"\r\nContent-Type: image/jpeg\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"images1\"; filename=\"1546577301737.jpg\"\r\nContent-Type: image/jpeg\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--");
    Request request = new Request.Builder()
    .url("https://sms.gabia.com/api/send/mms")
    .post(body)
    .addHeader("content-type", "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW")
    .addHeader("Authorization", "Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc=")
    .addHeader("cache-control", "no-cache")
    .build();
    
    Response response = client.newCall(request).execute();
    
    import requests
    url = 'https://sms.gabia.com/api/send/mms'
    payload = {'phone': '01000000000',
    'callback': '15444370',
    'message': 'MMS TEST MESSAGE',
    'refkey': 'RESTAPITEST1548722756',
    'subject': 'MMS TEST SUBJECT',
    'image_cnt': '2'}
    files = {('images0': open('','rb'),('images1': open('','rb')}
    headers = {
    'Authorization': 'Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc='
    }
    response = requests.request('POST', url, headers = headers, data = payload, files = files, allow_redirects=False, timeout=undefined, allow_redirects=false)
    print(response.text)
    var https = require('https');
    
    var options = {
    'method': 'POST',
    'hostname': 'sms.gabia.com',
    'path': '/api/send/mms',
    'headers': {
      'Authorization': 'Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc='
    }
    };
    
    var req = https.request(options, function (res) {
    var chunks = [];
    
    res.on("data", function (chunk) {
      chunks.push(chunk);
    });
    
    res.on("end", function (chunk) {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
    
    res.on("error", function (error) {
      console.error(error);
    });
    });
    
    var postData = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"phone\"\r\n\r\n01000000000\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"callback\"\r\n\r\n15444370\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"message\"\r\n\r\nMMS TEST MESSAGE\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"refkey\"\r\n\r\nRESTAPITEST1547771538\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"subject\"\r\n\r\nMMS TEST SUBJECT\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"image_cnt\"\r\n\r\n2\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"images0\"; filename=\"{Insert_File_Name}\"\r\nContent-Type: \"{Insert_File_Content_Type}\"\r\n\r\n{Insert_File_Content}\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"images1\"; filename=\"{Insert_File_Name}\"\r\nContent-Type: \"{Insert_File_Content_Type}\"\r\n\r\n{Insert_File_Content}\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--";
    
    req.setHeader('content-type', 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW');
    
    req.write(postData);
    
    req.end();
    require "uri"
    require "net/http"
    
    url = URI("https://sms.gabia.com/api/send/mms")
    
    https = Net::HTTP.new(url.host, url.port)
    https.use_ssl = true
    
    request = Net::HTTP::Post.new(url)
    request["Authorization"] = "Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc="
    request["content-type"] = 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW'
    request.body = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"phone\"\r\n\r\n01000000000\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"callback\"\r\n\r\n15444370\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"message\"\r\n\r\nMMS TEST MESSAGE\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"refkey\"\r\n\r\nRESTAPITEST1548722726\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"subject\"\r\n\r\nMMS TEST SUBJECT\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"image_cnt\"\r\n\r\n2\r\n\"images0\"' = '')\"images1\"' = '')------WebKitFormBoundary7MA4YWxkTrZu0gW--"
    
    response = https.request(request)
    puts response.read_body
    curl --location --request POST "https://sms.gabia.com/api/send/mms" \
    --header "Authorization: Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc=" \
    --form "phone=01000000000" \
    --form "callback=15444370" \
    --form "message=MMS TEST MESSAGE" \
    --form "refkey=RESTAPITEST1547715451" \
    --form "subject=MMS TEST SUBJECT" \
    --form "image_cnt=2" \
    --form "images0=@" \
    --form "images1=@"
    package main
    
    import (
    "fmt"
    "bytes"
    "mime/multipart"
    "os"
    "path/filepath"
    "net/http"
    "io/ioutil"
    )
    
    func main() {
    
    url := "https://sms.gabia.com/api/send/mms"
    method := "POST"
    
    payload := &bytes.Buffer{}
    writer := multipart.NewWriter(payload)
    _ = writer.WriteField("phone", "01000000000")
    _ = writer.WriteField("callback", "15444370")
    _ = writer.WriteField("message", "MMS TEST MESSAGE")
    _ = writer.WriteField("refkey", "RESTAPITEST1548722847")
    _ = writer.WriteField("subject", "MMS TEST SUBJECT")
    _ = writer.WriteField("image_cnt", "2")
    // add your file name in the next statement in place of path
    file, err := os.Open(path)
    defer file.Close()
    part, err := writer.CreateFormFile("file", filepath.Base(path))
    _, err := io.Copy(part, file)
    // add your file name in the next statement in place of path
    file, err := os.Open(path)
    defer file.Close()
    part, err := writer.CreateFormFile("file", filepath.Base(path))
    _, err := io.Copy(part, file)
    err := writer.Close()
    if err != nil {  fmt.Println(err)}
    
    
    client := &http.Client {
      CheckRedirect: func(req *http.Request, via []*http.Request) error {
        return http.ErrUseLastResponse
      },
    }
    req, err := http.NewRequest(method, url, payload)
    
    if err != nil {
      fmt.Println(err)
    }
    req.Header.Add("Authorization", "Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc=")
    
    req.Header.Set("Content-Type", writer.FormDataContentType())
    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)
    
    fmt.Println(string(body))
    }
  • 잔여 건수 조회
  • 발송 후, 총 잔여 건수를 조회할 수 있습니다. 메시지(sms)와 ARS 건수를 제공합니다.
  • GET https://sms.gabia.com/api/user/info
  • HEADERS
  • Authorization Basic base64encode(SMS_ID:ACCESS_TOKEN)
    (예) DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc=
  • <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://sms.gabia.com/api/user/info",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 0,
      CURLOPT_FOLLOWLOCATION => false,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "GET",
      CURLOPT_HTTPHEADER => array(
        "Authorization: Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc="
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    } ?>
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
    RequestBody body = RequestBody.create(mediaType, "undefined=");
    Request request = new Request.Builder()
      .url("https://sms.gabia.com/api/user/info")
      .get()
      .addHeader("Authorization", "Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc=")
      .addHeader("cache-control", "no-cache")
      .build();
    
    Response response = client.newCall(request).execute();
    import requests
    url = 'https://sms.gabia.com/api/user/info'
    payload = {}
    headers = {
      'Authorization': 'Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc='
    }
    response = requests.request('GET', url, headers = headers, data = payload, allow_redirects=False, timeout=undefined, allow_redirects=false)
    print(response.text)
    var https = require('https');
    
    var options = {
      'method': 'GET',
      'hostname': 'sms.gabia.com',
      'path': '/api/user/info',
      'headers': {
        'Authorization': 'Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc='
      }
    };
    
    var req = https.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    
      res.on("error", function (error) {
        console.error(error);
      });
    });
    
    req.end();
    require "uri"
    require "net/http"
    
    url = URI("https://sms.gabia.com/api/user/info")
    
    https = Net::HTTP.new(url.host, url.port)
    https.use_ssl = true
    
    request = Net::HTTP::Get.new(url)
    request["Authorization"] = "Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc="
    
    response = https.request(request)
    puts response.read_body
    curl --location --request GET "https://sms.gabia.com/api/user/info" \
      --header "Authorization: Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc="
    package main
    
    import (
      "fmt"
      "os"
      "path/filepath"
      "net/http"
      "io/ioutil"
    )
    
    func main() {
    
      url := "https://sms.gabia.com/api/user/info"
      method := "GET"
    
      client := &http.Client {
        CheckRedirect: func(req *http.Request, via []*http.Request) error {
          return http.ErrUseLastResponse
        },
      }
      req, err := http.NewRequest(method, url, nil)
    
      if err != nil {
        fmt.Println(err)
      }
      req.Header.Add("Authorization", "Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc=")
    
      res, err := client.Do(req)
      defer res.Body.Close()
      body, err := ioutil.ReadAll(res.Body)
    
      fmt.Println(string(body))
    }
  • 발송 결과 확인
  • 문자 발송 시, 사용자가 지정한 refkey (발송 시 사용한 unique key 값)로 실제 발송 상태를 확인할 수 있습니다.
  • GET https://sms.gabia.com/api/result_log/byRefkey?refkey=RESTAPITEST1547168952
  • HEADERS
  • Authorization Basic base64encode(SMS_ID:ACCESS_TOKEN)
    (예) Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc=
  • PARAMS
  • refkey RESTAPITEST1547168952
    The unique string that when you used send message
  • <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
    CURLOPT_URL => "https://sms.gabia.com/api/result_log/byRefkey?refkey=RESTAPITEST1547168952",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => false,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
      "Authorization: Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc="
    ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
    echo "cURL Error #:" . $err;
    } else {
    echo $response;
    } ?>
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
    RequestBody body = RequestBody.create(mediaType, "undefined=");
    Request request = new Request.Builder()
    .url("https://sms.gabia.com/api/result_log/byRefkey?refkey=RESTAPITEST1547168952")
    .get()
    .addHeader("Authorization", "Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc=")
    .addHeader("cache-control", "no-cache")
    .build();
    
    Response response = client.newCall(request).execute();
    import requests
    url = 'https://sms.gabia.com/api/result_log/byRefkey?refkey=RESTAPITEST1547168952'
    payload = {}
    headers = {
    'Authorization': 'Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc='
    }
    response = requests.request('GET', url, headers = headers, data = payload, allow_redirects=False, timeout=undefined, allow_redirects=false)
    print(response.text)
    var https = require('https');
    
    var options = {
    'method': 'GET',
    'hostname': 'sms.gabia.com',
    'path': '/api/result_log/byRefkey?refkey=RESTAPITEST1547168952',
    'headers': {
      'Authorization': 'Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc='
    }
    };
    
    var req = https.request(options, function (res) {
    var chunks = [];
    
    res.on("data", function (chunk) {
      chunks.push(chunk);
    });
    
    res.on("end", function (chunk) {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
    
    res.on("error", function (error) {
      console.error(error);
    });
    });
    
    req.end();
    require "uri"
    require "net/http"
    
    url = URI("https://sms.gabia.com/api/result_log/byRefkey?refkey=RESTAPITEST1547168952")
    
    https = Net::HTTP.new(url.host, url.port)
    https.use_ssl = true
    
    request = Net::HTTP::Get.new(url)
    request["Authorization"] = "Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc="
    
    response = https.request(request)
    puts response.read_body
    curl --location --request GET "https://sms.gabia.com/api/result_log/byRefkey?refkey=RESTAPITEST1547168952" \
    --header "Authorization: Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc="
    package main
    
    import (
    "fmt"
    "os"
    "path/filepath"
    "net/http"
    "io/ioutil"
    )
    
    func main() {
    
    url := "https://sms.gabia.com/api/result_log/byRefkey?refkey=RESTAPITEST1547168952"
    method := "GET"
    
    client := &http.Client {
      CheckRedirect: func(req *http.Request, via []*http.Request) error {
        return http.ErrUseLastResponse
      },
    }
    req, err := http.NewRequest(method, url, nil)
    
    if err != nil {
      fmt.Println(err)
    }
    req.Header.Add("Authorization", "Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc=")
    
    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)
    
    fmt.Println(string(body))
    }
  • 발신번호 리스트 조회
  • 사용 가능 여부와 관계 없이, 리스트에 있는 모든 발신번호를 확인할 수 있습니다.
  • GET https://sms.gabia.com/api/callback/list
  • HEADERS
  • Authorization Basic base64encode(SMS_ID:ACCESS_TOKEN)
    (예) Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc=
  • <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
    CURLOPT_URL => "https://sms.gabia.com/api/callback/list",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => false,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
      "Authorization: Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc="
    ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
    echo "cURL Error #:" . $err;
    } else {
    echo $response;
    } ?>
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
    .url("https://sms.gabia.com/api/callback/list")
    .get()
    .addHeader("Authorization", "Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc=")
    .addHeader("cache-control", "no-cache")
    .build();
    
    Response response = client.newCall(request).execute();
    import requests
    url = 'https://sms.gabia.com/api/callback/list'
    payload = {}
    headers = {
    'Authorization': 'Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc='
    }
    response = requests.request('GET', url, headers = headers, data = payload, allow_redirects=False, timeout=undefined, allow_redirects=false)
    print(response.text)
    var https = require('https');
    
    var options = {
    'method': 'GET',
    'hostname': 'sms.gabia.com',
    'path': '/api/callback/list',
    'headers': {
      'Authorization': 'Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc='
    }
    };
    
    var req = https.request(options, function (res) {
    var chunks = [];
    
    res.on("data", function (chunk) {
      chunks.push(chunk);
    });
    
    res.on("end", function (chunk) {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
    
    res.on("error", function (error) {
      console.error(error);
    });
    });
    
    req.end();
    require "uri"
    require "net/http"
    
    url = URI("https://sms.gabia.com/api/callback/list")
    
    https = Net::HTTP.new(url.host, url.port)
    https.use_ssl = true
    
    request = Net::HTTP::Get.new(url)
    request["Authorization"] = "Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc="
    
    response = https.request(request)
    puts response.read_body
    curl --location --request GET "https://sms.gabia.com/api/callback/list" \
    --header "Authorization: Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc="
    package main
    
    import (
    "fmt"
    "os"
    "path/filepath"
    "net/http"
    "io/ioutil"
    )
    
    func main() {
    
    url := "https://sms.gabia.com/api/callback/list"
    method := "GET"
    
    client := &http.Client {
      CheckRedirect: func(req *http.Request, via []*http.Request) error {
        return http.ErrUseLastResponse
      },
    }
    req, err := http.NewRequest(method, url, nil)
    
    if err != nil {
      fmt.Println(err)
    }
    req.Header.Add("Authorization", "Basic DckviEksLs6ZXlKMGVYQWlPaUpLVhiR2NpT2lKU1V6STFOaUo5LmV5SnBjM01pT2lKb2RIUndjenBjTDF3dmMyMXpMbWRoWW1saExtTnZiVnd2SWl3aVlYVmtJam9pWEM5dllYVjBhRnd2ZEc5clpXNGlMQ0pshWFhnT2pBNG5uVkVuLWtnVEJoRGpPeWc=")
    
    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)
    
    fmt.Println(string(body))
    }

전문가와 상담하세요

  • 상담/견적문의
  • 02-6948-3769
  • 비즈니스솔루션 고객센터
  • 1661-4370