Bird Verify
Preview मेंवह verification API जिसमें store करने के लिए कुछ नहीं।
Email, SMS, या WhatsApp पर एक one-time code भेजें, फिर उसे recipient के आधार पर check करें, दोनों calls के बीच रखने के लिए कोई verification id नहीं। Channel क्रम, sender, और code नियम हर देश के लिए configuration हैं, rebuild नहीं। हर दूसरे Bird channel जैसा ही auth और idempotency, क्योंकि इन सबको एक ही team ने बनाया है। Voice आगे रोल आउट हो रहा है।
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();
Install से verified user तक दो calls
एक code भेजें, फिर उसे check करें, उसी भाषा में जो आप पहले से इस्तेमाल करते हैं।
Create-or-retry code भेजता है; check उसे recipient के आधार पर confirm करता है। दो calls, और दोनों के बीच पिरोने के लिए कोई verification id नहीं।
import { BirdClient } from "@messagebird/sdk";
const bird = new BirdClient({ apiKey: process.env.BIRD_API_KEY! });
await bird.verify.verifications.create({
to: { phone_number: "+15551234567" },
}).safe();
const { data } = await bird.verify.verifications.check({
to: { phone_number: "+15551234567" },
code: "482917",
}).safe();दस चीजें जो आप नहीं बनाते
जब 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 क्रम, config के रूप में।
Channel क्रम, sender, और कौन-से channels चालू हैं, हर देश के लिए, एक first-class configuration resource के रूप में सेट करें, न कि support ticket के जरिए।
- 05
वे codes जो आप कभी नहीं देखते।
एक cryptographic random source से generate किए गए, केवल HMAC के रूप में store किए गए, constant time में तुलना किए गए। Plaintext code कभी आपके stack या हमारे logs को नहीं छूता।
- 06
Configurable code, TTL, attempts।
छह-अंकों का default, 4–10 configurable; एक 10-मिनट का window; 5 attempts; एक 60-second resend cooldown, हर configuration के लिए सेट। Code length को हर request के लिए भी override किया जा सकता है।
- 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 और quotas built in।
Per-recipient send caps, एक per-verification guess limit, और एक per-workspace daily quota, हर एक 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।
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();
Per-country routing configuration है।
Channel क्रम, sender, और कौन-से channels चालू हैं यह हर देश के लिए सेट करें — एक बाजार में WhatsApp-first, दूसरे में SMS-only। यह एक first-class config resource है, जो हर verification के plan में resolve होता है। देखें channel orchestration।
await bird.verify.verifications.configurations.countries.upsert(
"vfc_login",
"BR",
{ channels: [
{ channel: "whatsapp", state: "enabled" },
{ channel: "sms", state: "enabled" },
] },
).safe();
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 } = await bird.verify.verifications.check({
to: { phone_number: "+15551234567" },
code: userInput,
}).safe();
यदि आपने SMS integrate किया है, तो आपने Verify integrate कर लिया है।
वही auth model, वही idempotency contract, वही error envelope। फर्क बस इतना है कि Verify code generate करता है, channel चुनता है, और rate limits चलाता है — ताकि आपको न करना पड़े।
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",
});Verify API FAQ
मैं अपने ऐप में verification कैसे जोड़ूं?+
मैं किन channels पर verify कर सकता हूं?+
क्या मुझे verification id store करनी पड़ती है?+
जब कोई गलत code दर्ज करता है तो क्या होता है?+
Codes कैसे generate और store किए जाते हैं?+
इसकी कीमत कितनी है?+
मेरे users को code किसकी ओर से दिखता है?+
वह sender जो आपके users को दिखता है: Authifly
आपके end users को उनके codes Authifly से मिलते हैं, जो Bird की verification brand है। साझा senders पर OTP email otp@verify.authifly.com से आता है और SMS संदेश में Authifly का नाम होता है, ताकि codes एक सुसंगत पहचान के तहत आएं जिसे चलाना आपको नहीं पड़ता। यदि किसी recipient को अप्रत्याशित code मिलता है, तो authifly.com उन्हें आश्वस्त करता है कि Authifly किसी व्यवसाय की ओर से वैध one-time codes भेजती है। Authifly का संचालन Bird B.V. करती है।
authifly.com पर जाएंआपके बाकी messaging जैसी ही platform पर verification।
Verify preview में है। आज ही एक build शुरू करें, या हमसे उन channels, volume, और pricing के बारे में बात करें जिनकी आपको जरूरत है।