I'm on the hunt for a budget-friendly API to handle OTP authentication via SMS. I've tried Twilio, but after the trial period, it charges $0.05 for each verification. Are there any cheaper or free alternatives you can recommend? Also, just a heads up, my server is built with Golang.
4 Answers
Honestly, I’d advise against using SMS for OTPs at all. It’s not the most secure method, and the costs can really add up like you've seen. There are many alternatives for MFA that are either low-cost or free, such as using an authenticator app or services like Authy or Auth0. If SMS is a must, consider Bandwidth.com or Sinch; I use Sinch, and it’s about $0.002 per message.
If you're open to using a local service, consider a GoIP device. It allows you to connect with local SMS providers at much better rates. You can check out this guide on how to set it up: Sending SMS through GoIP GSM gateway using HTTP API.
You might want to look into AWS SNS (Simple Notification Service). It’s generally one of the cheaper options out there for SMS. Just keep in mind that with SMS, you'll probably incur carrier-related fees in addition to AWS's charges. If you're willing to consider email instead, AWS SES (Simple Email Service) might be a more cost-effective solution since it’s typically much cheaper.
There really aren't any truly unlimited free SMS OTP APIs since SMS has inherent costs. However, Firebase offers a pretty decent free tier for testing, which includes about 10,000 verifications each month. You could also look into local providers beyond Twilio for better pricing.
Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically