Quickstart
Send and check your first code in five minutes.
Create a business and a test key
Sign in to the console, create a business, then
open API keys and create a test key. It starts with vm_test_ and is
shown once — put it in your server's environment:
VERIFYME_API_KEY=vm_test_...Test keys never spend credits. See Testing.
Send a code
import { Verifyme } from "@cubis/verifyme"
const verifyme = Verifyme.fromEnv() // reads VERIFYME_API_KEY
const { token } = await verifyme.send({
target: "+85512345678", // E.164 phone, or an email with provider "email"
provider: "sms",
})
// Store `token` server-side (session, cache). Never send it to the browser.No SMS provider yet? In test mode the console shows the message under Verifications, so you can read the code there.
Check it
const { success } = await verifyme.check({ token, code: userInput })
if (success) {
// mark the phone as verified
}Done. For a ready-made UI instead of your own form, continue with the widget.