Bird Verify
वह verification API जिसमें store करने के लिए कुछ नहीं।
Send a one-time code over email, SMS, or WhatsApp, then check it by recipient, with no verification id to keep between the two calls. The channel order, sender, and code rules already resolve per country automatically. Same auth and idempotency as every other Bird channel, because the same team built them all. Voice is rolling out next.
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, error } = await bird.verify.verifications.check({
to: { phone_number: "+15551234567" },
code: userInput,
}).safe();
if (error) throw error;
Two calls from npm install to a verified user
एक code भेजें, फिर उसे check करें, उसी भाषा में जो आप पहले से इस्तेमाल करते हैं।
Create-or-retry code भेजता है; check उसे recipient के आधार पर confirm करता है। दो calls, और दोनों के बीच पिरोने के लिए कोई verification id नहीं।
const verification = await bird.verify.verifications.create({
to: { phone_number: "+15551234567" },
});
console.log(verification.id, verification.status);दस चीजें जो आप नहीं बनाते
जब verification ही API हो।
ठोस primitives, नामित और configurable। कोई गोलमोल बात नहीं।
- 01
एक ही call में create या retry।
वही recipient दोबारा post करें और हम live session फिर से शुरू कर देते हैं और cooldown बीतते ही दोबारा भेज देते हैं। कोई अलग resend endpoint नहीं, कोई duplicate verifications नहीं।
- 02
Target के आधार पर check करें। कुछ भी store न करें।
Recipient और code submit करें; हम configuration-और-recipient जोड़ी से session resolve कर लेते हैं। Send और check के बीच persist करने के लिए कोई verification id नहीं होती।
- 03
Launch पर Email, SMS, और WhatsApp।
आप जो recipient देते हैं वही channel चुनता है: एक email address email से verify होता है, एक phone number SMS या WhatsApp से। Channels बदलना एक-field का बदलाव है, नया integration नहीं। Voice आगे रोल आउट हो रहा है, और channels के बीच automatic fallback रास्ते में है।
- 04
Per-country channel order, already resolved.
Channel order, sender, and which channels are on differ by country. Bird's per-country base decides this, so a create call already resolves to the right plan everywhere.
- 05
वे codes जो आप कभी नहीं देखते।
एक cryptographic random source से generate किए गए, केवल HMAC के रूप में store किए गए, constant time में तुलना किए गए। Plaintext code कभी आपके stack या हमारे logs को नहीं छूता।
- 06
Configurable code, TTL, attempts।
Six-digit default, 4–10 configurable per request; a 10-minute window; 5 attempts; a 60-second resend cooldown.
- 07
हर code session खत्म होने तक valid रहता है।
एक देर से आया message और एक ताजा दोबारा भेजा गया code दोनों verify करते हैं, क्योंकि जब नया code जाता है तब हम पुराने code को invalidate नहीं करते।
- 08
गलत code एक 200 है, exception नहीं।
Check एक boolean result के साथ जवाब देता है — इस code ने verify किया या नहीं, हां या नहीं — और एक reason जो न होने पर विस्तार देता है: invalid, expired, already verified, या attempts खत्म। आप एक field पर branch करते हैं, कभी किसी thrown error पर नहीं।
- 09
Rate limits built in।
Per-recipient send caps और एक per-verification guess limit, हर एक Retry-After के साथ एक 429, ताकि brute force आपसे पहले खत्म हो जाए।
- 10
बाकी Bird जैसा ही contract।
Bearer auth, एक idempotency key, typed vrf_ ids, एक error envelope। जो handler आपने email के लिए लिखा वह verification के लिए पहले से फिट बैठता है।
Verify platform को explore करें
हर capability गहराई से। एक API, keys का एक set।
SMS OTP.
SMS पर one-time passcodes, वैश्विक पहुंच और built-in rate limits के साथ।
Email OTP.
उसी network पर email से verify करें जो पहले से आपका transactional mail ढोता है।
WhatsApp OTP.
उसी plan में एक orderable channel के रूप में WhatsApp पर codes भेजें।
Voice OTP.
रोल आउट हो रहा है: landlines, accessibility, और मुश्किल-से-पहुंचने वाले users के लिए एक बोला जाने वाला code।
Channel orchestration.
Per-country channel order, senders, and enable/disable, resolved automatically for every send.
Anti-abuse & code security.
Hashed codes, per-recipient caps, attempt lockout, और fraud roadmap।
Send और check के बीच कुछ भी store न करें।
ज्यादातर verification APIs आपको एक id देती हैं जिसे persist करना, look up करना, और उसके खिलाफ code submit करना होता है। Bird recipient से session resolve कर लेता है, इसलिए आपकी तरफ कोई per-verification state नहीं होती।
ज्यादातर verification APIs
Create एक id return करता है जिसे आप store करते हैं, फिर उसके खिलाफ code check करने के लिए verification को look up करते हैं।
const { id } = await api.verifications.create({
to: "+15551234567",
});
// persist id somewhere, then later…
await api.verifications.check({ id, code });
Bird Verify
Recipient के आधार पर check करें। दोनों calls के बीच पिरोने के लिए कुछ नहीं।
await bird.verify.verifications.create({
to: { phone_number: "+15551234567" },
}).safe();
// no id to store; check by the same recipient
await bird.verify.verifications.check({
to: { phone_number: "+15551234567" }, code,
}).safe();
Routing already knows the country.
Channel order, senders, and which channels are on differ by country: WhatsApp-first in one market, SMS-only in another. Bird's per-country base decides this, so a create call already resolves to the right plan. See channel orchestration.
// Brazil already resolves WhatsApp, then SMS.
const { data, error } = await bird.verify.verifications.create({
to: { phone_number: "+5511998765432" },
}).safe();
if (error) throw error;
Verification एक product निर्णय भी है: वही API two-factor authentication और passwordless login को शक्ति देता है। पहले किसी number को validate कर रहे हैं? इसे Lookup के साथ जोड़ें। Silent network authentication और TOTP authenticator apps roadmap पर हैं।
हम Verify क्यों बनाते हैं
क्योंकि जो code किसी user को अंदर आने देता है उसे अपनी खुद की database table की जरूरत नहीं होनी चाहिए।
OTP वह channel है जहां जो code नहीं पहुंचता वह signup है जो नहीं होता। Bird पहले से email और SMS को scale पर चलाता है, इसलिए Verify वही delivery है और साथ में code generation, session, per-country channel plan, और rate limits, दो endpoints के पीछे जो आपकी तरफ कुछ store नहीं करते और हर दूसरे Bird channel जैसे ही आकार में जवाब देते हैं।
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, error } = await bird.verify.verifications.check({
to: { phone_number: "+15551234567" },
code: userInput,
}).safe();
if (error) throw error;
यदि आपने SMS integrate किया है, तो आपने Verify integrate कर लिया है।
Same auth model, same idempotency contract, same error envelope. The difference is that Verify generates the code, picks the channel, and runs the rate limits, so you don't.
Verify
एक call code भेजती है; एक call उसे recipient के आधार पर check करती है। Code, session और limits हमारे जिम्मे हैं।
await bird.verify.verifications.create({
to: { phone_number: "+15551234567" },
});SMS
Raw send, जब आप code generation और retry policy खुद संभालना चाहते हैं।
await bird.sms.send({
from: "Bird",
to: "+15551234567",
text: `Your code is ${code}.`,
category: "authentication",
});Choose the sender your users see
Codes go out under Bird Verify by default, and no registration or template setup stands in the way. Switch a channel to Authifly and your users see a neutral verification identity instead of a platform vendor: the OTP email comes from otp@verify.authifly.com, and SMS shows the Authifly sender wherever the destination country permits a branded one. Bird operates both identities, so the choice costs you nothing to run, and you make it per channel and per country. On email you can go further and send from a domain you have verified yourself. If a recipient gets an unexpected code, authifly.com reassures them that Authifly sends legitimate one-time codes on a business's behalf. Authifly is operated by Bird B.V.
authifly.com पर जाएंआपके बाकी messaging जैसी ही platform पर verification।
Start a build today, or talk to us about the channels, volume, and pricing you need.