기업회원 신청 서류 안내
신청자 구분에 따라 재직증명서 또는 위임장을 함께 제출해 주세요.
신청자 구분에 따라 재직증명서 또는 위임장을 함께 제출해 주세요.
JavaScript / TypeScript / SDK REFERENCE
The official React SDK for sending Kakao Alimtalk, Brand Message and SMS from Next.js Server Actions and Route Handlers — server-side only.
npm install @sendgo/reactThe official React SDK for sending Kakao Alimtalk, Brand Message and SMS from Next.js
@sendgo/react wraps the @sendgo/node core as ready-made Server Actions for the Next.js App Router.
Server-side only. These functions are marked
'use server'. Your access key and secret key must never reach the browser — if you call them from a Client Component, Next.js sends the invocation to the server, not the keys, which is exactly what you want. Never construct a client inside a'use client'module.
Requires React 18+ and Next.js 14+.
npm install @sendgo/react
The core @sendgo/node comes along as a dependency.
The Server Actions read these environment variables, so there is no client construction to wire up:
SENDGO_ACCESS_KEY=your_access_key
SENDGO_SECRET_KEY=your_secret_key
SENDGO_KAKAO_SENDER_KEY=your_kakao_sender_key
SENDGO_SMS_SENDER_KEY=your_sms_sender_key
SENDGO_API_VERSION=v2
Do not prefix these with NEXT_PUBLIC_ — that would inline them into the browser bundle.
// app/orders/actions.ts
'use server';
import { sendAlimtalk } from '@sendgo/react';
export async function notifyOrderConfirmed(phone: string, orderNo: string) {
return sendAlimtalk({
templateCode: 'ORDER_CONFIRM_001',
contacts: [{ contact: phone, name: 'Gildong Hong', var1: orderNo }],
});
}
// app/orders/[id]/page.tsx
import { notifyOrderConfirmed } from '../actions';
export default function OrderPage({ params }: { params: { id: string } }) {
return (
<form action={async () => { await notifyOrderConfirmed('01012345678', params.id); }}>
<button type="submit">Send confirmation</button>
</form>
);
}
| Action | Channel |
|---|---|
sendAlimtalk(params) |
Kakao Alimtalk |
sendFriendtalk(params) |
Kakao Friendtalk |
sendBrandMessage(params) |
Kakao Brand Message |
broadcastBrandMessage(params) |
Brand Message broadcast (targeting: 'F') |
listBrandMessages(params?) |
Brand Message campaign list |
getBrandMessage(campaignId) |
Brand Message campaign detail |
sendSms(params) |
SMS |
sendLms(params) |
LMS |
sendMms(params) |
MMS |
createSendgoClient(config?) |
the raw Sendgo client, for anything above |
Friendtalk was discontinued on 2025-12-31. Since 2026-01-01 Kakao delivers Friendtalk requests as Brand Message (free-form) automatically.
friendtalkstill works and is still the only path for free-formFT/FI/FWto individual recipients — use Brand Message for template-based rich types (FL/FC/FM/FP/FA), non-friend targeting (N/I) and broadcasts (F). Brand Message is the successor channel to Friendtalk: it reaches recipients who are not channel friends (targeting: 'N') and can broadcast to every consenting channel friend (targeting: 'F'). Message types map one-to-one with Friendtalk (FT→BT,FI→BI,FW→BW,FL→BL,FC→BC,FM→BM,FP→BP,FA→BA) — pass the Friendtalk code and the server converts it.
v2 only. Set
SENDGO_API_VERSION=v2.
'use server';
import {
sendBrandMessage,
broadcastBrandMessage,
listBrandMessages,
getBrandMessage,
} from '@sendgo/react';
// Single send — channel friends
export async function promoteToFriends(phone: string) {
return sendBrandMessage({
targeting: 'M',
messageType: 'FL',
friendTemplateUuid: '9cd5460b-6458-4edc-9b11-c26d3013c340',
contacts: [{ contact: phone, var1: '29,000 KRW' }],
});
}
// Broadcast — every consenting channel friend (no recipient list)
export async function announce() {
return broadcastBrandMessage({
messageType: 'FW',
friendTemplateUuid: '9cd5460b-6458-4edc-9b11-c26d3013c340',
});
}
// A broadcast is asynchronous upstream, so poll for the result
export async function broadcastStatus(campaignId: string) {
return getBrandMessage(campaignId);
}
export async function recentCampaigns() {
return listBrandMessages({ count: 10 });
}
broadcastBrandMessage takes Omit<BrandMessageParams, 'targeting' | 'contacts'>, so TypeScript rejects passing a recipient list to a broadcast rather than letting the API do it at runtime.
When you need a plain HTTP endpoint — for a webhook or a non-React caller:
// app/api/notify/route.ts
import { NextResponse } from 'next/server';
import { sendAlimtalk } from '@sendgo/react';
import { SendgoError } from '@sendgo/react';
export async function POST(request: Request) {
const { phone, orderNo } = await request.json();
try {
await sendAlimtalk({
templateCode: 'ORDER_CONFIRM_001',
contacts: [{ contact: phone, var1: orderNo }],
});
return NextResponse.json({ ok: true });
} catch (error) {
if (error instanceof SendgoError) {
// Don't leak provider detail to the caller; log it and return a generic status.
console.error(`Sendgo ${error.statusCode} [${error.errorCode}]: ${error.message}`);
return NextResponse.json({ ok: false }, { status: error.statusCode >= 500 ? 502 : 400 });
}
throw error;
}
}
useAlimtalk gives a Client Component pending/error state around a Server Action, without ever touching the keys. It returns { send, loading, error, data, reset }:
'use client';
import { useAlimtalk } from '@sendgo/react';
export function SendButton({ phone, orderNo }: { phone: string; orderNo: string }) {
const { send, loading, error, data, reset } = useAlimtalk();
return (
<>
<button
disabled={loading}
onClick={() => send({
templateCode: 'ORDER_CONFIRM_001',
contacts: [{ contact: phone, var1: orderNo }],
})}
>
{loading ? 'Sending…' : 'Send'}
</button>
{error && (
<p role="alert">
{error.message} <button onClick={reset}>Dismiss</button>
</p>
)}
{data && <p>Sent.</p>}
</>
);
}
If your keys do not come from environment variables — a multi-tenant app resolving them per request, for instance — build the client yourself:
'use server';
import { createSendgoClient } from '@sendgo/react';
export async function sendForTenant(tenant: Tenant, phone: string) {
const sendgo = createSendgoClient({
accessKey: tenant.sendgoAccessKey,
secretKey: tenant.sendgoSecretKey,
kakaoSenderKey: tenant.kakaoSenderKey,
apiVersion: 'v2',
});
return sendgo.alimtalk.send({
templateCode: 'ORDER_CONFIRM_001',
contacts: [{ contact: phone }],
});
}
Called with no argument, createSendgoClient() returns the shared environment-configured singleton.
Every request shape is re-exported from the core, so payloads are checked at compile time:
import type {
AlimtalkParams,
FriendtalkParams,
BrandMessageParams,
BrandMessageListParams,
BrandMessageTargeting,
SmsParams,
Contact,
SendgoConfig,
SendgoResponse,
} from '@sendgo/react';
Short URLs shrink the links in your message body and count whether they were actually clicked. SMS is billed by byte, so a shorter link leaves more room for copy.
v2 only.
Shortening the same target URL again returns the existing link. Pass forceNew
to mint a new code when you want per-campaign reaction figures kept separate.
deactivate does not delete the link — it only stops the redirect. Use it when a link
in an already-sent message has to be killed; the accumulated stats stay, and visitors
to a stopped link get 410 Gone.
'use server';
import { createShortUrl, shortUrlStats } from '@sendgo/react';
export async function shorten(targetUrl: string) {
const created = await createShortUrl({ targetUrl });
return created.data.shortUrl;
}
export async function reactions(code: string) {
return shortUrlStats(code, { from: '2026-08-01' });
}
stats returns a daily series (daily) plus breakdowns by device (byDevice), referrer (byReferer) and country (byCountry). The daily series is read from a pre-aggregated table, so response time stays flat no matter how many clicks accumulate.
@sendgo/react (npm)Sign in to Sendgo and open API/SDK → API integration to issue an access key and secret key.
Register a Kakao sender profile under Kakao channel to get your SENDGO_KAKAO_SENDER_KEY, and a caller ID under Sender numbers for SMS.
From issuing an access key to sending a Kakao Alimtalk, with working code in Node.js, Python, PHP, Laravel, Java and Go.
Pick the organisation, issue API keys, register sender numbers and templates from a coding agent. Everything except topping up credit works without the console.
Exchange an accessKey and secretKey for a bearer token, and call the Sendgo API with it. Differences between v1 and v2, token caching, and the 401/403 codes.
Send Kakao Alimtalk with an approved template code. Runnable code for Laravel, Node.js, Python, PHP, Java, Go, Ruby and .NET, plus every required field and why sends fail.
Send Korean SMS (90 bytes), LMS (long text) and MMS (with images) through Sendgo. Type selection, byte counting, verification-code patterns and advertising rules.
Send Brand Messages to channel friends, non-friends, or every consenting friend at once. How targeting splits the request path, and when to keep using the Friendtalk endpoint.
Use replaceSms so a text message goes out when the Alimtalk cannot be delivered. Required fields, cost implications, and the mistake that silently sends nothing.
Send one template to many recipients with different values each, in batches. Batch sizing, partial failures, queue patterns and the data hygiene that prevents most incidents.
Send at a specific time with scheduleType SCHEDULED. Timestamp format, the KST timezone trap, and how scheduling interacts with the advertising night ban.
Register Kakao channels, submit Alimtalk templates for review, file sender numbers, and sync opt-outs without ever sending anyone to sendgo.io. Includes webhook delivery of review outcomes.
Every error code returned by the Sendgo send endpoints, and how to tell a failure worth retrying from one that will fail identically every time.
Shorten long URLs to fit inside an SMS and measure who clicked. Creating short links, reading click stats, and splitting stats per campaign.
What Korean law requires of promotional SMS and Kakao messages, and how to enforce it in code: the (광고) prefix, a free opt-out, and no sending between 21:00 and 08:00 KST.
What happens to existing Friendtalk code now that the channel has ended, when you must migrate to Brand Message, and the one case where the Friendtalk endpoint is still the right call.
The Node.js and TypeScript SDK for sending Kakao Alimtalk, Brand Message and SMS — fully typed, zero runtime dependencies.
npm install @sendgo/nodeThe official Vue SDK for sending Kakao Alimtalk, Brand Message and SMS from Nuxt server routes — server-side only.
npm install @sendgo/vueThe official NestJS module for sending Kakao Alimtalk, Brand Message and SMS — sync and async registration, injectable service.
npm install @sendgo/nestjs