wain119 SMS API 연동 가이드

1. API 기본 정보

항목 내용
서버 주소 https://9935485a-dddb-454e-897f-82ad7d755a27-00-dkq8ms8lrjbw.spock.replit.dev
인증방식 없음 (오픈 API)
응답형식 JSON
문자인코딩 UTF-8
상태 정상 운영

2. 인증번호 발송 API

POST /api/wowsms/send Content-Type: application/json { "phoneNumber": "01099998888" }

요청 파라미터

파라미터 타입 필수 설명
phoneNumber String 회원가입자 전화번호 (010xxxxxxxx 형식)

성공 응답

{ "success": true, "message": "wain119 SMS가 성공적으로 발송되었습니다.", "code": "123456", "verificationId": "wain119_1737518218000_abc123def", "messageId": "3898-326352898-e2cd13d3-d897-4ee7-b112-0ce3ceba4280", "response": "sent,success,3898-326352898-e2cd13d3-d897-4ee7-b112-0ce3ceba4280,1073389351,+821099998888" }

실패 응답

{ "success": false, "message": "wain119 SMS 발송 실패: InvalidPhoneNumber", "response": "InvalidPhoneNumber" }

3. JavaScript 연동 예제

// JavaScript (브라우저/Node.js)
async function sendSMS(phoneNumber) {
    try {
        const response = await fetch('https://9935485a-dddb-454e-897f-82ad7d755a27-00-dkq8ms8lrjbw.spock.replit.dev/api/wowsms/send', {
            method: 'POST',
            headers: {
                'Content-Type': 'application/json'
            },
            body: JSON.stringify({
                phoneNumber: phoneNumber
            })
        });
        
        const result = await response.json();
        
        if (result.success) {
            console.log('SMS 발송 성공:', result.code);
            return result;
        } else {
            console.error('SMS 발송 실패:', result.message);
            return null;
        }
    } catch (error) {
        console.error('API 호출 오류:', error);
        return null;
    }
}
// 사용 예시
sendSMS('01099998888').then(result => {
    if (result) {
        alert(`인증번호가 발송되었습니다: ${result.code}`);
    } else {
        alert('SMS 발송에 실패했습니다.');
    }
});

4. PHP 연동 예제

<?php
function sendSMS($phoneNumber) {
    $url = 'https://9935485a-dddb-454e-897f-82ad7d755a27-00-dkq8ms8lrjbw.spock.replit.dev/api/wowsms/send';
    $data = json_encode([
        'phoneNumber' => $phoneNumber
    ]);
    
    $options = [
        'http' => [
            'header' => "Content-Type: application/json\r\n",
            'method' => 'POST',
            'content' => $data
        ]
    ];
    
    $context = stream_context_create($options);
    $result = file_get_contents($url, false, $context);
    
    return json_decode($result, true);
}

// 사용 예시
$result = sendSMS('01099998888');
if ($result['success']) {
    echo "인증번호: " . $result['code'];
} else {
    echo "발송 실패: " . $result['message'];
}
?>

5. Python 연동 예제

import requests
import json

def send_sms(phone_number):
    url = 'https://9935485a-dddb-454e-897f-82ad7d755a27-00-dkq8ms8lrjbw.spock.replit.dev/api/wowsms/send'
    
    data = {
        'phoneNumber': phone_number
    }
    
    headers = {
        'Content-Type': 'application/json'
    }
    
    try:
        response = requests.post(url, json=data, headers=headers)
        result = response.json()
        
        if result['success']:
            print(f"SMS 발송 성공: {result['code']}")
            return result
        else:
            print(f"SMS 발송 실패: {result['message']}")
            return None
            
    except Exception as e:
        print(f"API 호출 오류: {e}")
        return None

# 사용 예시
result = send_sms('01099998888')
if result:
    print(f"인증번호: {result['code']}")
else:
    print("SMS 발송 실패")

6. 응답 필드 설명

필드명 타입 설명
success Boolean 발송 성공 여부
message String 결과 메시지
code String 6자리 인증번호 (성공시에만)
verificationId String 인증 세션 ID (성공시에만)
messageId String SMS 메시지 ID (성공시에만)
response String wain119 원본 응답

7. 주의사항

8. 테스트

API 테스트는 다음 링크에서 가능합니다:

https://9935485a-dddb-454e-897f-82ad7d755a27-00-dkq8ms8lrjbw.spock.replit.dev/wain119-verification-simple.html

9. 시스템 상태

항목 상태 최종 확인
wain119 API 정상 2025-07-22
SMS 발송 DELIVRD 2025-07-22
인증번호 수신 확인 2025-07-22