Providers / Mutlucell

Test Mutlucell SMS without sending real messages

otpmock emulates the Mutlucell XML SMS API (sndblkex) API. In your test environment, the official HTTP API SDK talks to otpmock instead of Mutlucell; 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 Mutlucell client at it, and use your otpmock API key as the Mutlucell credential. Your application code doesn't change, and production keeps sending real SMS through Mutlucell.

Setup

Apps usually post the XML directly, so only the host changes. The official PHP package hard-codes its host and can't be redirected; post the XML yourself in tests. Errors come back as bare codes: 23 wrong credentials, 20 bad XML, 22 no credits.

Language
sms.jsNode.js · HTTP API
const MUTLUCELL_URL = process.env.OTPMOCK_URL ?? "https://smsgw.mutlucell.com";

const xml = `<?xml version="1.0" encoding="UTF-8"?>
<smspack ka="${process.env.MUTLUCELL_USER}" pwd="${process.env.MUTLUCELL_PASSWORD}" org="MUTLUCELL">
  <mesaj><metin>Doğrulama kodunuz: ${code}</metin><nums>5321234567</nums></mesaj>
</smspack>`;
const res = await fetch(`${MUTLUCELL_URL}/smsgw-ws/sndblkex`, {
  method: "POST",
  headers: { "content-type": "text/xml; charset=UTF-8" },
  body: xml,
});
const result = await res.text(); // "$12345678#1.0" or an error code

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 pwd (Mutlucell accepts an API key in that attribute too).

What otpmock emulates

EndpointWhat it does
POST /smsgw-ws/sndblkexXML <smspack ka pwd org><mesaj><metin/><nums/></mesaj></smspack>; response $<packetID>#<credits> or an error code

Responses and errors follow Mutlucell's own format, so the SDK parses them as usual. Authentication failures and an exhausted monthly allowance also come back in Mutlucell'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/smsgw-ws/sndblkex \
  -H "content-type: text/xml; charset=UTF-8" \
  -d '<?xml version="1.0" encoding="UTF-8"?><smspack ka="x" pwd="'"$OTPMOCK_API_KEY"'" org="MUTLUCELL"><mesaj><metin>Dogrulama kodunuz: 884422</metin><nums>5321230002</nums></mesaj></smspack>'
Response
$65625528#1.0

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

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

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

Phone numbers

Mutlucell accepts any format (05321234567, 905321234567, 532 123 45 67). otpmock stores Turkish numbers as +905321234567.

How to tell your app uses Mutlucell

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 Mutlucell
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 Mutlucell?

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

Is the official HTTP API SDK supported?

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

Which Mutlucell APIs does otpmock support?

POST /smsgw-ws/sndblkex (XML <smspack ka pwd org><mesaj><metin/><nums/></mesaj></smspack>; response $<packetID>#<credits> or an error code).

Test Mutlucell 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