Long code एक स्टैंडर्ड 10-digit फ़ोन नंबर है जो SMS भेजता और प्राप्त करता है. यह two-way बातचीत, OTP और मध्यम वॉल्यूम पर alerts के लिए डिफ़ॉल्ट sender है. US application ट्रैफ़िक के लिए इसे A2P 10DLC के ज़रिए रजिस्टर किया जाता है.
import { BirdClient } from "@messagebird/sdk";
const bird = new BirdClient({ apiKey: process.env.BIRD_API_KEY! });
const code = generateOtp();
const { data, error } = await bird.sms.send({
from: "Bird",
to: "+15005550006",
text: `Your Bird verification code is ${code}. Reply STOP to opt out.`,
category: "authentication",
}).safe();
if (error) throw error;
console.log(data.id);
// → "sms_4kT01Lq2m..."
Today at 2:14 PM
long code कब सही चुनाव होता है.
Long codes are one of the four sender types on the Bird SMS numbers surface, part of the broader Bird SMS API. They're local, two-way, and quick to provision: the right starting point for most conversational and transactional traffic before volume justifies a short code.
long code आपको क्या देता है.
लोकल presence, two-way ट्रैफ़िक, मध्यम वॉल्यूम.
- 01
एक लोकल 10-digit नंबर.
प्राप्तकर्ता अपने ही देश या क्षेत्र का area code देखते हैं, जो किसी marketing blast के बजाय एक असली sender जैसा लगता है.
- 02
डिफ़ॉल्ट रूप से two-way.
Point the number's inbound traffic at a webhook and replies arrive as signed events, the foundation for conversational flows.
- 03
A2P 10DLC के ज़रिए रजिस्टर्ड.
US application ट्रैफ़िक रजिस्टर्ड 10DLC campaigns पर चलता है, जिससे filtering का जोखिम बनने के बजाय जांचा-परखा throughput और carriers का भरोसा मिलता है.
- 04
रजिस्ट्रेशन क्लियर होते ही लाइव.
नंबर तुरंत खरीदें; इसकी 10DLC campaign के मंज़ूर होते ही यह रजिस्टर्ड ट्रैफ़िक ले जाना शुरू कर देता है.
एक खरीदें और भेजना शुरू करें.
Search by country and capability, buy the number, and route its inbound at a webhook, the same client you send with. The same code shape provisions any sender type; only the type field changes.
const { data: available } = await bird.numbers.search({
country: "US",
type: "long-code",
capabilities: ["sms"],
}).safe();
const { data: number } = await bird.numbers.buy({
number: available[0].number,
webhook: "https://example.com/webhooks/bird",
}).safe();रजिस्ट्रेशन इस डील का हिस्सा है.
US नंबरों पर application-to-person ट्रैफ़िक भेजने के लिए, एक long code रजिस्टर्ड A2P 10DLC campaign पर चलता है. Bird dashboard से brand और campaign फ़ाइल करता है और API के ज़रिए approval status रिपोर्ट करता है, ताकि आपको ठीक-ठीक पता रहे कि पूरा throughput कब उपलब्ध है.
भेजने के अन्य तरीके
Long codes चार sender types में से एक हैं. बाकी की तुलना करें.
long code पर शुरू करें, ज़रूरत पड़ने पर स्केल करें.
Long codes, Bird SMS numbers surface पर एक sender type हैं. एक provision करें, campaign रजिस्टर करें, और उसी API से inbound route करें जिससे आप भेजते हैं.