SMS OTP
प्रीव्यू मेंSMS से कोड भेजें. recipient के आधार पर जाँचें.
SMS verification sends a one-time code to a phone number and confirms the person typing it back holds the line. Bird generates the code, sends it, enforces per-recipient caps, and checks it by recipient, so there's no id to store and no resend endpoint to wire.
import { BirdClient } from "@messagebird/sdk";
const bird = new BirdClient({ apiKey: process.env.BIRD_API_KEY! });
// Send the code, then check it by recipient.
await bird.verify.verifications.create({
to: { phone_number: "+15551234567" },
}).safe();
const { data } = await bird.verify.verifications.check({
to: { phone_number: "+15551234567" },
code: userInput,
}).safe();
SMS OTP भेजने के लिए एक कॉल और जाँचने के लिए एक कॉल है।
SMS Bird Verify API पर एक फ़ोन-फ़ैमिली चैनल है: फ़ोन नंबर के साथ एक verification पोस्ट करें और हम साझा Authifly SMS sender पर कोड भेजते हैं; उसी नंबर से इसे जाँचें। create को दोबारा पोस्ट करना ही resend है (create-or-retry), और सेशन का हर कोड तब तक वैध रहता है जब तक वह वेरिफाई नहीं हो जाता, एक्सपायर नहीं हो जाता, या उसके attempts खत्म नहीं हो जाते।
SMS verification पर आपको क्या मिलता है।
हर सेंड में बिल्ट-इन।
- 01
फ़ोन नंबर से संबोधित।
एक अकेला E.164 फ़ोन नंबर पास करें। हम इसे नॉर्मलाइज़ करते हैं और उसके देश के लिए रिज़ॉल्व किए गए sender पर SMS से भेजते हैं।
- 02
सर्वर-जनरेटेड, हैश किए गए कोड।
डिफ़ॉल्ट रूप से 6-अंकों का कोड (4–10 कॉन्फ़िगर करने योग्य), जो एक क्रिप्टोग्राफ़िक रैंडम स्रोत से जनरेट होता है और सिर्फ़ HMAC के रूप में स्टोर होता है। आप कभी प्लेनटेक्स्ट नहीं देखते।
- 03
Resend वही कॉल है।
Re-post the create to resend once the 60-second cooldown passes: same session, new code, both still valid. No separate resend endpoint.
- 04
प्रति-recipient सीमाएँ शामिल।
एक प्रति-recipient सेंड कैप सेंड वॉल्यूम और बेकाबू खर्च को सीमित करता है, Retry-After के साथ 429 है।
- 05
पहुँच जो देश के हिसाब से बढ़ती है।
SMS आज साझा Authifly sender पर भेजा जाता है, जहाँ यह रजिस्टर्ड है वहाँ डिलीवर करने योग्य, और डेडिकेटेड व रजिस्टर्ड senders आने पर पहुँच बढ़ाते जाते हैं।
पूरा फ़्लो, दो कॉल।
Create-or-retry sends the code to the phone number; check confirms it by that number. There's no id to thread between the two: the recipient is the key.
await bird.verify.verifications.create({
to: { phone_number: "+15551234567" },
}).safe();
const { data } = await bird.verify.verifications.check({
to: { phone_number: "+15551234567" },
code: userInput,
}).safe();
// data.result is true or false; data.reason elaborates ("expired", "already_verified", …)SMS OTP FAQ
SMS OTP क्या है?
क्या कोड जाँचने के लिए मुझे verification id स्टोर करनी होगी?
मैं किन देशों तक पहुँच सकता हूँ?
आप SMS pumping और brute force को कैसे रोकते हैं?
मेरे उपयोगकर्ता कोड किसकी ओर से देखते हैं?
बाकी Verify प्लेटफ़ॉर्म
एक API, कीज़ का एक सेट। बाकी क्षमताओं को एक्सप्लोर करें।
वह verification API जिसमें स्टोर करने के लिए कुछ नहीं।
SMS is one channel of Bird Verify: email and WhatsApp ship with it, and voice is rolling out, all on the same two endpoints.