English
Receiving Botswana SMS codes through an API call
Yes, you can receive Botswana (+267) SMS verification codes with OTP Route: create an activation for country bw through the OTP Gateway API or the dashboard, and the code comes back by polling or a signed webhook. Prices start at $0.20 per code, and you are charged only when an SMS actually lands on the number.
Which API calls does a Botswana activation go through?
Everything sits under https://otproute.com/api/v1 and is authenticated with a Bearer key that starts with or_live_. You create keys in the Developer console; an account can hold up to 10 of them, and the limit is 300 requests per minute, which is plenty for a test suite that orders a handful of Botswana numbers per run.
A typical sequence looks like this:
- Call
GET /api/v1/countriesonce and cache it, so your code knowsbwis the identifier for Botswana. - Ask
GET /api/v1/prices?country=bw&service=whatsappfor the live price and availability of the pairing you need. Prices vary by service and country, so read them instead of hard-coding. - Send
POST /api/v1/activationswith the body{"service": "whatsapp", "country": "bw"}. The response carries the +267 number and an activation id. - Enter that number in the sign-up form under test, then either poll
GET /api/v1/activations/{id}or wait for a webhook. - If the test is aborted, call
POST /api/v1/activations/{id}/cancelso the funds return to the wallet straight away.
The OTP API integration guide walks through the same calls with error handling in mind.
How should my webhook receiver treat +267 events?
Webhooks are the cleaner choice once more than one test runs in parallel. Register an endpoint (five per account) and listen for activation.sms_received, activation.expired and activation.cancelled, each keyed on the activation id you got when ordering.
Every delivery carries an X-OTPRoute-Signature header in the form t=<unix>,v1=<hex>. Rebuild the HMAC-SHA256 of the string "<t>.<raw body>" with the endpoint secret, compare it to v1 in constant time, and drop anything whose timestamp is stale. Parse the JSON only after the check passes, because re-serialising the body changes the bytes.
Make the handler idempotent: store the activation id when the code is consumed and ignore a repeat of the same event. Details are in securing OTP webhooks with HMAC.
What can a Botswana verification number be used for?
The live snapshot for Botswana lists more than 800 services. Among the popular ones are WhatsApp, Telegram, Google (Gmail & YouTube), Facebook, Instagram, TikTok, ChatGPT (OpenAI), Microsoft & Outlook, Amazon, LinkedIn, Uber, Signal, Netflix and Airbnb.
Availability on a given route shifts during the day as carrier capacity changes. That is the reason the price endpoint also reports what is orderable right now: treat its answer as the source of truth rather than this list.
What should engineers know about Botswana phone numbers?
Botswana uses country code +267 and has no trunk prefix, so the national number is dialled as it is written. Mobile numbers are eight digits and begin with 7. In E.164 that gives +267 followed by the eight digits, with no zero to strip.
A few practical points for anyone storing or validating these numbers:
- Normalise everything to E.164 on input. Users may type
00267, spaces or a leading plus; reduce them all to one canonical form before you compare or deduplicate. - Do not reuse a trunk-prefix rule from a neighbouring market. A validator copied from a country that drops a leading zero will reject valid Botswana entries.
- English and Setswana are the main languages. Codes from global apps usually arrive in English, but your parser should extract digits by pattern rather than rely on fixed wording.
Teams test here when they launch a product in southern Africa, check onboarding for customers who sit across the border from South Africa, or run regional operations that need a local +267 number for testing.
Can a non-developer order a Botswana code from the dashboard?
Yes. Sign up with your email and a six-digit code (or Google), top up the wallet, then open the OTP Gateway, choose Botswana and the service, check the price shown and order. Paste the number into the app you are testing; the code appears in the dashboard as soon as the SMS reaches the route.
Each activation stays open for 20 minutes. If no message arrives in that time, or you cancel first, the full amount goes back to your wallet automatically.
What if the Botswana code never arrives?
Delivery speed depends on the service and the route, so give the window time before acting. If it closes empty, work through this list:
- Try again a little later, or pick another service route for the same flow if your product supports it.
- Confirm the app on the other end is willing to text a virtual line; a few apps turn such numbers away, which is precisely why unused activations come back to your balance.
- Let the 20-minute window finish instead of cancelling after a minute.
- Avoid re-ordering in a tight loop from CI; add a back-off between attempts.
More patterns are in reducing failed OTP deliveries. Whatever you test, follow each service's terms; OTP Route's Acceptable Use Policy applies to every order.
Is there a long-term +267 line, and how is billing handled?
Not as a self-serve product. Dedicated Numbers are sold instantly only in the United States and Canada, from $1.95/month; for Botswana you can email [email protected] to ask, and availability depends on local rules. See virtual numbers for what the US and Canadian lines include.
Billing is one prepaid USD wallet with no monthly fee, topped up by card or with USDT/USDC, and every top-up comes with a PDF invoice by email. For integration work, a development account can be switched to sandbox on request so the whole flow runs on simulated numbers and codes. Current rates are on the pricing page.
Frequently asked questions
What is the country id for Botswana in the OTP Route API?
It is bw. Pass it as country in POST /api/v1/activations and in the query string of GET /api/v1/prices.
Can I test my app's Botswana sign-up flow without a local SIM?
Yes. Order a +267 number for your app's service through the OTP Gateway and read the code in the dashboard or on your webhook, with no SIM card or phone involved.
Do Botswana numbers need a leading zero when stored?
No. Botswana has no trunk prefix, so store the number as +267 plus the eight-digit mobile number.
Am I charged if the +267 code does not come through?
No. If nothing arrives within the 20-minute window, or you cancel, the full amount returns to your wallet automatically.
Can I keep a Botswana number for future logins?
There is no self-serve long-term number for Botswana. Long-term lines are a US and Canada product; email [email protected] if you need to ask about other options.
Can I run Botswana tests in CI without spending wallet funds?
Ask for your development account to be switched to sandbox. It returns simulated numbers and codes, so the full API and webhook path can be exercised at no cost.
Service names are trademarks of their respective owners. OTP Route is not affiliated with them. Use numbers lawfully, follow each service's terms and our Acceptable Use Policy.