hono-pages-send-only (Example)
한국어 번역본이 없어 영문 예제 문서를 표시합니다.
Cloudflare Pages Functions + Hono send template with:
- advanced send route (
POST /send) using rawSendInputJSON (single or batch) - SMS shortcut route (
POST /send/sms)
Install
섹션 제목: “Install”cd examples/hono-pages-send-onlybun installConfigure
섹션 제목: “Configure”- Copy
.dev.vars.exampleto.dev.vars. - Fill IWINV provider secrets.
Run
섹션 제목: “Run”bun run devEndpoint
섹션 제목: “Endpoint”POST /send(advanced single/batch)POST /send/sms
For batch requests to POST /send, the route always returns 200.
Check per-item success/failure in data.results.
Advanced request body (single, raw SendInput):
{ "type": "SMS", "to": "01012345678", "text": "hello from advanced route", "from": "01000000000", "providerId": "iwinv"}Advanced request body (batch, raw SendInput[]):
[ { "type": "SMS", "to": "01012345678", "text": "hello from advanced route #1", "from": "01000000000", "providerId": "iwinv" }, { "type": "SMS", "to": "01012345679", "text": "hello from advanced route #2", "from": "01000000000", "providerId": "iwinv" }]SMS shortcut request body:
{ "to": "01012345678", "text": "hello", "from": "01000000000"}