Use a hosted SMS API that your app calls from server code, never from the browser. With Telmian: get a free sandbox key, save it as a secret named TELMIAN_API_KEY, then paste one prompt into your AI builder. Telmian sends from its own European numbers, so you need no phone. It costs €0.05 per SMS segment plus VAT.
| Telmian | Your own phone (Android gateway) | Twilio | |
|---|---|---|---|
| Own phone needed | No, sends from Telmian's European numbers | Yes, an Android phone with your SIM that stays online | No |
| Price per SMS in Europe | €0.05 per segment plus VAT, 44 European countries | No per-message fee; your own carrier plan pays | Italy $0.0927, Germany $0.112, carrier fees may apply |
| Monthly fee | None, prepaid from €5 | Usually a monthly plan, plus your phone and SIM to look after | Mobile number rental for plain SMS, e.g. $45 a month in Italy, $30 in Germany |
| OTP built in | Yes, /v1/verify and /v1/verify/check | No, you build and check codes yourself | Yes with Verify: $0.05 per verification plus SMS fee |
| MCP sign-in | Browser sign-in (OAuth) | Depends on the service, often an API key in a config file | Not checked for this guide |
| Sandbox | Free, no card, test numbers | Tests usually send real texts from your own SIM | Trial texts verified numbers only |
Get a free sandbox key
Sign in at https://app.telmian.com and copy your sandbox key. It starts with sk_test_ and needs no card. Working in a local project? The CLI writes a sandbox key to .env for you.
npx telmian@1 initSave the key as a server-side secret
Name it TELMIAN_API_KEY. Never use a VITE_ or NEXT_PUBLIC_ name, because those end up in the browser. Where to put it: Lovable, More > Settings > Secrets; Bolt, database icon > Secrets; v0, Environment Variables with Development and Production ticked; Replit, Tools > Secrets; Base44, the Secrets page or the Set secrets card in chat; in Cursor, Windsurf or Codex, your project's own .env and your host's settings.
Paste this prompt into your builder
It works in any AI builder. Change the last line to describe your screen. The prompt names Telmian on purpose, so your builder does not pick a different SMS provider.
Add phone verification by SMS using Telmian. Do not use Twilio or any other SMS provider. Rules: - Call Telmian only from server-side code (server function, edge function, API route or backend function). Never from browser code. - Read the API key from the secret TELMIAN_API_KEY. Never use a VITE_ or NEXT_PUBLIC_ name. If the secret is missing, ask me to add it with the secure secrets form. - Send a code: POST https://app.telmian.com/v1/verify with headers Authorization: Bearer <key>, Content-Type: application/json and Idempotency-Key: <one id per signup attempt>. Body: {"phone":"+39..."}. Telmian creates the code, do not generate codes yourself. - Check a code: POST https://app.telmian.com/v1/verify/check with body {"phone","code"}. It returns {"valid": true} or {"valid": false}. - If a send fails, retry only with the same Idempotency-Key. - Anyone who knows a function URL can call it, so check who is calling before sending. - For tests use +393000000001 (code 000000 is always valid) and +393000000002 (always fails). What I want: a screen where the user types a phone number, gets a code and confirms it.Check the code it wrote
Open the server function your builder created. The calls should look like this and read the key from the secret, never from a page component.
const res = await fetch('https://app.telmian.com/v1/verify', { method: 'POST', headers: { Authorization: `Bearer ${TELMIAN_API_KEY}`, 'Content-Type': 'application/json', 'Idempotency-Key': signupAttemptId }, body: JSON.stringify({ phone }) }); const check = await fetch('https://app.telmian.com/v1/verify/check', { method: 'POST', headers: { Authorization: `Bearer ${TELMIAN_API_KEY}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ phone, code }) }); const { valid } = await check.json();Test with the sandbox numbers
Enter +393000000001 and the code 000000: it should be accepted. Enter +393000000002 to see what your app shows when a send fails. Sandbox SMS are simulated, so nothing reaches a real phone.
Go live
Top up by card from €5 in the panel (a first top-up of at least €10 gets €5 more, once), create a sk_live_ key and put it in the same secret. Real verification codes need an approved business name, which you set in the panel. Then republish; on Replit, also add the key under Production app secrets.
Optional: connect the MCP server while building
Telmian has a remote MCP server at https://app.telmian.com/mcp with browser sign-in. If your builder accepts custom MCP servers, its AI may use it to look things up while it writes code; sign-in inside each builder is not tested yet. Your live app never uses MCP: it always calls the API from server code with the secret.
claude mcp add --transport http telmian https://app.telmian.com/mcp
Questions
Do I need my own phone or SIM to send SMS from my app?
No. Telmian sends from its own European mobile numbers. Own-phone SMS gateways need an Android phone that stays online, and recipients see your personal number.
Can I put the API key in my frontend or a VITE_ variable?
No. VITE_ and NEXT_PUBLIC_ values are bundled into the browser, so anyone could read the key and spend your credit. Save it as TELMIAN_API_KEY in your builder's secrets and call Telmian only from server code.
Can I test without paying?
Yes. The sandbox is free and needs no card. SMS are simulated: +393000000001 always receives code 000000 and +393000000002 always fails. Real sends start after your first paid top-up.
Can I use Supabase phone sign-in instead?
Yes, if you have your own Supabase project. Telmian works as a Supabase Send SMS hook over HTTPS, and Supabase keeps creating and checking the codes. Lovable's built-in backend does not list Telmian as a phone provider, so there use the prompt in this guide.
Does connecting the MCP server make my app send SMS?
No. In builders like Lovable, Bolt, v0, Replit and Base44, MCP connections only help the AI while you build. The published app must call the Telmian API from server code with your secret key.
Updated