One-time codes, without the toll fraud.
Two calls prove someone has that number or mailbox, and a fraud guard runs before you pay for a text.
coss.verify.start()
// The user typed their number: send them a code.
const { } = await ..({
: "+14155550123", // or an email address
: ,
: "user_42",
});
// They typed the code they got: check it.
const { : } = await ..({
: "+14155550123",
: ,
});Enter your code
Sent to +1 415 555 0123
- 4
- 8
- 2
- 9
- 1
- 3
- verification.started
- verification.sent
- verification.approved
SMS pumping stops before you pay for it
The fraud guard checks every new verification first, and a blocked one costs nothing.
Read the docsBefore a code goes out
- Your Risk listsno match
- Line typemobile
- Tor exit nodeno
- Velocity per IP and usernormal
- Prefix +1 415 555verify.prefix_low_conversion
- verification.blockedNo SMS sent, nothing billed
One call, whichever way the code travels
A number gets an SMS and an address gets an email. SMS goes only to the countries you allow.
Read the docscoss.verify.start()
to: "+14155550123"SMS, from shared numbers or your ownto: "ada@example.com"Email, from your domain or coss.com's senderto: "+33612345678"country_not_allowed, until you add France
verification_01k7c8m4q2third code
- 1
- 2
- 3
- 4
- 5
The old code stops working and the expiry restarts. There's no resend endpoint and no state on your side.
Resends that just work
Starting again for a pending destination sends a new code, up to 5 per verification.
Read the docsWhat coss.com keeps
- The code
- an HMAC, until it expires
- The message text
- erased once sent
- Logs
- never the code
- Webhooks
- never the code
- Email subjects
- never the code
Codes are never stored or logged
Only an HMAC of each code exists, and only until the verification expires.
Read the docsPricing and limits
You pay per approved verification, plus the channel. Blocked, failed and expired ones cost only the messages actually sent. Full details in the docs.
PricingSee all plans
Verifications
$0.05per verification
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
- Stored
- an HMAC of the code, until it expires
- Verifications kept
- 30 days
- Sandbox codes
- always zeros
Questions
Call coss.verify.start() with the phone number and the end 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; only valid true from the check proves the number is theirs.
Yes. Start a verification with an email address instead of a phone number and the code goes by email, from an address on one of your verified domains or from coss.com's sender as "your app via coss.com". The code is never in the subject, and the email has no links or tracking.
Every new verification passes a fraud guard 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 stored with its reasons, and nothing is sent or billed.
No. Only an HMAC of the code is kept, until the verification expires, and the text of the SMS or email is erased once it is sent. The code never appears in logs or webhooks.
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.
You pay per approved verification, plus the channel. An SMS from your own number is billed like any SMS, one from coss.com's shared numbers at its country's SMS rate, and email codes cost nothing extra. Blocked, failed and expired verifications cost only the messages actually sent. The pricing page lists the rates.
Use a sandbox key. The code is always zeros, such as 000000 with the default length, SMS go to the SMS simulator and emails to the sandbox's fake provider, and nothing is billed. The fraud guard still runs, so a premium-rate test number is blocked as in live environments.
Works with
On the same key, SDK, webhooks and logs: nothing more to set up.
Compared
Start with Verify today.
Development keys record every request and event and deliver nothing.