import { SMSGo } from '@orynlabs/smsgo'
const smsgo = new SMSGo({ apiKey: process.env.SMSGO_KEY })
const otp = await smsgo.send({
phone: '+5511999990000',
message: 'Your SMSGo verification code is 184502. Valid for 5 minutes.',
})
console.log(otp.id, otp.status)// Signed webhook delivered to your endpoint
import { verifyWebhookSignature } from '@orynlabs/smsgo'
app.post('/webhook/smsgo', (req, res) => {
const signature = req.headers['x-smsgo-signature']
const payload = JSON.stringify(req.body)
// Verify the HMAC-SHA256 signature before processing
const isValid = verifyWebhookSignature(payload, signature, process.env.SMSGO_WEBHOOK_SECRET)
if (!isValid) return res.status(401).send('invalid')
console.log(req.body.status, req.body.phone)
res.status(200).send('ok')
})96% of users prefer to receive verification codes by SMS
— survey by Twilio.
Frequently asked questions
How does SMS OTP work with SMSGo?
Send the code through our REST API or SDKs for Node.js, PHP, Python, and Go. The user receives it in seconds and enters it in your app. Signed webhooks report delivery and failures in real time.
How long does code delivery take?
Most OTP codes arrive within 10 seconds. Intelligent routing and carrier failover maximize delivery rates in Brazil.
Do I need a card to test?
No. Create an account and receive 3 free SMS, no card or monthly fee. Test mode also validates the flow without consuming credits.
Does the API support 2FA?
Yes. SMSGo supports two-factor authentication, password recovery, transaction confirmation, and any flow requiring a one-time SMS code.
How does OTP sending comply with LGPD?
SMSGo provides automatic opt-out, TLS encryption, minimal logs, and controlled retention. Test mode also lets you validate integrations without production data.
Ready to implement OTP?
Create your free account and receive 3 SMS to test the SMSGo verification API.
Create free account