Providers / Verimor

Test Verimor SMS without sending real messages

otpmock emulates the Verimor SMS API v2 (GET /v2/send, POST /v2/send.json) API. In your test environment, the official HTTP API SDK talks to otpmock instead of Verimor; your end-to-end tests read each code over HTTPS.

Updated October 8, 2026Tested with the official HTTP API SDK
Short answer

Set OTPMOCK_URL=https://api.otpmock.com in your test environment, point the Verimor client at it, and use your otpmock API key as the Verimor credential. Your application code doesn't change, and production keeps sending real SMS through Verimor.

Setup

Verimor has no official Node.js SDK; apps call the HTTP API directly, so only the host changes. Responses are plain text: the campaign ID on success, INSUFFICIENT_CREDITS, MISSING_MESSAGE and similar codes on 400.

Language
sms.jsNode.js · HTTP API
const VERIMOR_URL = process.env.OTPMOCK_URL ?? "https://sms.verimor.com.tr";

const res = await fetch(`${VERIMOR_URL}/v2/send.json`, {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    username: process.env.VERIMOR_USERNAME,
    password: process.env.VERIMOR_PASSWORD, // otpmock API key in tests
    source_addr: "BASLIGIM",
    messages: [{ msg: `Doğrulama kodunuz: ${code}`, dest: "905321234567" }],
  }),
});
const campaignId = await res.text();

Each language is tested in CI against otpmock with the provider's official SDK, or its plain HTTP API where no SDK can be pointed at another host.

Credentials. In the test environment, use your otpmock API key as the Verimor password. The username can stay as it is.

What otpmock emulates

EndpointWhat it does
GET /v2/sendQuery string: username, password, source_addr, msg, dest (comma-separated)
POST /v2/send.jsonJSON: username, password, source_addr, messages[] with msg and dest

Responses and errors follow Verimor's own format, so the SDK parses them as usual. Authentication failures and an exhausted monthly allowance also come back in Verimor's error shape.

Try it with cURL

Before wiring your app, check the emulation by hand. Put your own key in OTPMOCK_API_KEY; the number is made up. Keep the message text ASCII when you run this from a Windows terminal, which can garble accented letters on the command line.

Send a test SMS
curl https://api.otpmock.com/v2/send.json \
  -H "content-type: application/json" \
  -d '{"username":"x","password":"'"$OTPMOCK_API_KEY"'","source_addr":"BASLIGIM","messages":[{"msg":"Dogrulama kodunuz: 336699","dest":"905321230001"}]}'
Response
16168421

The response has Verimor's own shape. Now read the code your test would read:

Read the code
curl https://api.otpmock.com/v1/inbox/%2B905321230001/code \
  -H "Authorization: Bearer $OTPMOCK_API_KEY"

{"code":"336699","messageSid":"SM…","receivedAt":1795257752284}

Phone numbers

Verimor uses 905321234567. otpmock stores it as +905321234567; local 5321234567 also works.

How to tell your app uses Verimor

Look for any of these in your codebase to confirm where the SMS is sent, and therefore where the otpmock option has to be set:

Read the code in your tests

signup.spec.ts
const phone = otp.randomPhone();
const since = Date.now() - 5_000;
await page.getByRole("button", { name: "Send code" }).click(); // your app calls Verimor
const { code } = await otp.waitForCode(phone, { since });

The otp helper is a single file: get it from the docs. Full walkthroughs: Playwright, Cypress.

FAQ

Does otpmock send real SMS through Verimor?

No. In the test environment your app's Verimor requests go to otpmock, which stores the message for 10 minutes and never contacts Verimor or any carrier. Production keeps using Verimor because otpmock is only enabled when OTPMOCK_URL is set.

Is the official HTTP API SDK supported?

Yes. otpmock's Verimor endpoints are tested end to end with the official HTTP API package for Node.js. Other languages work too if their Verimor client lets you change the API host.

Which Verimor APIs does otpmock support?

GET /v2/send (Query string: username, password, source_addr, msg, dest (comma-separated)); POST /v2/send.json (JSON: username, password, source_addr, messages[] with msg and dest).

Test Verimor flows today

The free plan includes 300 messages a month. Using an AI coding assistant? Point it at otpmock.com/llms-full.txt.

Get a free API key

Related guides

Other providers