Key Takeaways
- PowerShell send-OTP against an Android SMS gateway is Invoke-RestMethod over HTTPS/JSON — not a PowerShell SMS module product.
- Generate and hash the code in your app; PowerShell only transports the SMS.
- Stable Idempotency-Key; never put Bearers in committed .ps1 files.
- You bring phone and operator airtime. Free/Developer pause at the SMS allowance.
- No Unlimited SMS titles.
PowerShell Android SMS gateway API — send OTP is ops-friendly transport, not an SDK. OTP use case · Parse DLR. Docs: Developer Center.
Devices and send volume. You fund the SIM.
Digits stay out of the PowerShell history export.
PowerShell is REST glue
Same physics as any language client: Bearer, JSON, radio on the phone. Scripts that mint a new Idempotency-Key on every retry double OTPs.
A green Invoke-RestMethod exit only means the control plane accepted the job.
How to send OTP
- App creates challenge + hash.
- POST SMS with short TTL wording.
- User types code in your UI.
- Backend verifies hash; ignore “script success” as login.
curl -X POST "https://app.sms-gateway.app/api/v1/messages" \
-H "Authorization: Bearer $SMS_GATEWAY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 3f1b0c8a-9d2e-4c77-9f5a-2b6d1e0f4a83" \
-d '{"to":["+14155552671"],"text":"Your verification code is 481920","type":"sms"}'OTP send checklist
| Check | Pass |
|---|---|
| Key storage | Env/vault — not in git |
| Idempotency-Key | Challenge id |
| Allowlist | Staff MSISDNs in staging |
| DLR | Webhook or GET |
| Phone | last-seen online; OTP SIM isolated |
Secrets and allowlists
Secure keys. Cap resends in product logic.
Next steps
One staff canary; confirm single SMS and hash verify. Downloads. Free: 300 SMS lifetime.
Related product pages
Jump to the live product docs for this topic—not another long-form article.
- OTP and 2FA SMS on AndroidAuthentication flows
- SMS API documentationLive endpoint reference
- device and SMS volume pricingPlans and allowances
- Android SMS gateway product guideDefinition, product, and how to buy





