import { SMSGo } from '@orynlabs/smsgo'
const smsgo = new SMSGo({ apiKey: process.env.SMSGO_KEY })
const campaign = await smsgo.send({
phone: '+5511999990000',
message: 'Reply YES to confirm your interest. - SMSGo',
shortCode: true,
})
console.log(campaign.id, campaign.status)// Configure the reply webhook in the SMSGo dashboard
import { verifyWebhookSignature } from '@orynlabs/smsgo'
app.post('/webhook/smsgo/replies', (req, res) => {
const signature = req.headers['x-smsgo-signature']
const payload = JSON.stringify(req.body)
if (!verifyWebhookSignature(payload, signature, process.env.SMSGO_WEBHOOK_SECRET)) {
return res.status(401).send('invalid')
}
const { phone, message } = req.body
console.log('Reply from', phone, ':', message)
res.status(200).send('ok')
})Set up Short Code in 5 steps
- Create your SMSGo account. Sign up free and receive 3 SMS.
- Configure the reply webhook. Enter the endpoint URL that will receive user replies by POST in the dashboard.
- Send SMS through Short Code. Use the SMSGo REST API or SDK to send messages through the shared Short Code.
- Validate in test mode. Test the complete sending and receiving flow without consuming real credits.
- Go to production. After validation, start messaging users and pay only for SMS sent.
Frequently asked questions
What is a Short Code and how does it work with SMSGo?
A Short Code is a 4-to-6-digit number used to send and receive SMS at scale. SMSGo provides a shared Short Code through its REST API for campaigns, surveys, promotions, and support without requiring your own number.
What is the difference between a long code and Short Code?
A long code is a complete phone number suited to light two-way communication. A Short Code is easier to remember and designed for high-volume campaigns and quick replies in Brazil.
Can I receive user replies?
Yes. When a user replies, SMSGo sends the message to your endpoint through an HMAC-SHA256 signed webhook for automation, support, or storage.
Do I need a card to test?
No. Create an account and receive 3 free SMS, no card or monthly fee. Test sending and receiving before going to production.
How much does Short Code cost?
There is no monthly fee for the shared Short Code. You pay only for SMS sent according to SMSGo pricing. Prepaid USD credits never expire.
Start using Short Code today
Create your free account and receive 3 SMS to test SMS sending and receiving with Short Code.
Create free account