Home · Guides

Phone sign-in for Lovable, Base44 and Cursor apps

AI builders write the code for you, but they need a service that sends the SMS. Paste our ready-made prompt and the builder connects Otipi by itself.

At a glance

Lovable, Cursor
A ready-made prompt from the dashboard
Base44
Import the OpenAPI description
Key
Kept in the project secrets as OTIPI_KEY
AI agents
MCP server for Claude, ChatGPT and Cursor
Test mode
Free, no card

Lovable and Cursor

Open the Connect page in the dashboard and copy the prompt. Paste it into Lovable or Cursor and add your key to the project secrets as OTIPI_KEY. The builder adds a server function that sends and checks codes through our API.

Base44

Import the API from its OpenAPI description at otipi.co.il/openapi.json. Base44 then knows every call: login codes, messages and statuses.

Keep the key on the server

The key must never be in the browser code. Every builder has a place for secrets: put the key there, and call Otipi only from a server function.

Agents and MCP

Otipi has a remote MCP server. Add it to Claude, ChatGPT or Cursor, and the assistant can send a test code, check it and show you the code for your stack.

Example

Add Otipi to this project. Otipi is an API for login codes, SMS and email to recipients in Israel.

Rules:
- Call Otipi from server code only (an API route, a server action or an edge function). The key is a secret: read it from the environment variable OTIPI_KEY and never send it to the browser.
- Base URL: https://otipi.co.il/v1. Every request carries the header "Authorization: Bearer <key>" and a JSON body.
- A key that starts with sk_test_ is free and returns the code in "test_code". It really delivers only to the owner's own confirmed phone (5 free SMS) and the account email; everything else stays in the log. Use it while building.

Phone login in two calls:
1. POST /v1/otp/send {"to": "+972501234567", "app": "<the name of this app>"} -> 201 {"id", "status": "pending", "expires_at"}
   Optional: "channel": "sms" | "email" (sms by default), "language": "he" | "ar" | "ru" | "en".
2. POST /v1/otp/verify {"to": "+972501234567", "code": "<what the person typed>"} -> {"valid": true} or {"valid": false, "reason": "wrong_code" | "expired_or_missing" | "too_many_attempts"}
   Sign the person in only when "valid" is true.

Supabase Auth (Send SMS hook, Send Email hook):
- No code is needed for this. Tell the user to copy the hook address and its secret from the Otipi dashboard (page Connect) and, in the Supabase Dashboard -> Authentication -> Hooks, to add a Send SMS hook (phone codes) or a Send Email hook (all auth emails) of the HTTP type with them.

Base44:
- Connect using OpenAPI specification at https://otipi.co.il/openapi.json (https://otipi.co.il/openapi.json).

Other messages: POST /v1/messages {"channel": "sms" | "email", "to": "...", "text": "..."} -> 202 {"id", "status": "queued"}. An email also needs "subject" and, with a live key, "from" on a verified domain.

Phone numbers are Israeli mobiles written as +9725XXXXXXXX. An error comes as {"error": {"code", "message"}} with a fitting HTTP status: show the person a short message and log the code.

Full reference: https://otipi.co.il/llms-full.txt
OpenAPI: https://otipi.co.il/openapi.json

Questions

Does it work in Lovable Cloud?

Yes, through the prompt: the code is sent by your own server function. The built-in phone sign-in of Lovable Cloud is a different thing and supports only its own providers.

Do I need to know how to code?

No. You paste the prompt and the key; the builder writes the code.

What does a test cost?

Nothing. A test key is free and returns the code in the answer, so you can try the whole flow first.

Try it in a minute

A free test key right away, no card. Test codes go to your own phone and email.

Get a test key Read the docs

More guides