Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Aprenda a usar o SDK de Node.js para enviar SMS com a API.
npm install @rewritetoday/sdk
yarn add @rewritetoday/sdk
pnpm add @rewritetoday/sdk
bun install @rewritetoday/sdk
REWRITE_API_KEY=rw...
import { Rewrite } from '@rewritetoday/sdk'; const rewrite = new Rewrite(process.env.REWRITE_API_KEY); async function sendSms(to: string) { const params = { to, content: 'Your OTP code is 478201', }; const { data, error } = await rewrite.messages.send(params); if (error) { throw error; } return data; } async function main() { const message = await sendSms('+1234567890'); console.log(message); } main().catch(console.error);