Two calls send and check a code. The fraud guard runs first, so SMS pumping never reaches your bill.
coss.verify.start()
// 1. Send a code. The fraud guard runs first.
await ..({
: .,
: ., // the end user's address, not your server's
: "user_42",
});
// 2. Check the code they typed, on your backend.
const { : } = await ..({
: .,
: .,
});+1 415 555 0123
user_42
- coss.verify.start()status: pending
- sms.delivered
- coss.verify.check()valid: true
- verification.approved
A fraud guard that runs first
Premium-rate numbers, Tor exit nodes and bursts are checked before a code goes out. A blocked one costs nothing.
Read the docsVerifications
| To | Stopped by | Status |
|---|---|---|
| +1 415 555 0123 | none | approved |
| +1 415 555 0142 | Burst to one prefix | blocked |
| +1 415 555 0177 | Tor exit node | blocked |
Nothing worth stealing
Attempts, expiry and resends are handled for you, and codes never appear in logs or webhooks.
See howWhat coss.com keeps
The codekeyed hash, until it expires
The message texterased once sent
Logs and webhooksnever the code
coss.risk.checkPhone()+14155550123
validtrue
countryUS
line_typemobile
carrier.nameT-Mobile USA, Inc.
Know the line first
See whether a number exists, whether it's mobile, landline or VoIP, and which network it's on.
Read the docsVerify settingsCountries
United Statesallowed
Canadaallowed
Anywhere elsecountry_not_allowed
Countries you choose
Codes go only where Verify's settings allow, and someone who replied STOP gets none until they reply START.
See howPricing and limits
You pay per approved verification, plus the SMS that carried the code.
PricingSee all plans
Verifications
$0.05per verification
Risk phone
$0.01per check
The Free plan includes
- 100 risk phone checks a month
Paid plans start at $25/month, credited against usage.
Limits
- Code length
- 6 digits by default, 4 to 10
- Code lifetime
- 10 minutes by default, 1 to 30 minutes
- Wrong codes allowed
- 5 by default, 1 to 10
- Codes per verification
- 5, the first and its resends
- Codes per destination
- 5 every 10 minutes
- Default SMS countries
- US and Canada
- Live SMS sender
- Your own registered number; coss.com's shared numbers as they roll out
- Phone checks per organization
- 5 per second, bursts of 10, 1,000 per day
- Verifications kept
- 30 days
- Sandbox codes
- always zeros
Questions
Call coss.verify.start() with the number in E.164 form and the user's IP address, then coss.verify.check() with the code they typed. coss.com makes the code, sends it, counts the attempts and expires it, and only a valid check proves the number is theirs.
For live SMS codes, yes for now. Choose one of your registered numbers in Verify's settings; without one, a live code fails with shared_sender_unavailable. coss.com's shared numbers are being rolled out and will send when you haven't chosen a number. Sandbox environments and email codes need no number.
Live SMS needs a paid plan and a registered number. US 10DLC registration goes through carrier review and usually takes a few days. You can build and test in a sandbox environment at any point.
Verify's fraud guard checks every new verification before a code is sent. It blocks premium-rate and non-mobile numbers, Tor exit nodes, entries on your Risk block list, bursts from one IP address, user or number prefix, and prefixes or countries whose codes are rarely entered. A blocked verification is neither sent nor billed.
Yes. coss.risk.checkPhone() returns the number's line type and carrier, including non_fixed_voip for numbers anyone can get online in minutes. It is a separate call from Verify, and you decide what to do with the answer.
Starting a verification for the same destination while one is pending sends a new code, the earlier one stops working and the expiry restarts. A verification can send at most 5 codes, and each destination gets at most 5 every 10 minutes.
No. Only a keyed hash of the code is kept, until the verification expires, and the text of the SMS is erased once it is sent. The code never appears in logs or webhooks.
Use a sandbox key. The code is always zeros, messages go to the SMS simulator and appear in the dashboard, and nothing is billed. The fraud guard still runs, so a premium-rate test number is blocked as in live environments.
Build it this afternoon.
Development keys record every request and event and deliver nothing.