# Test your app's SMS and one-time-code flows on a cloud Android phone.

The `receive_sms` action delivers a text message to a Mobilebox cloud Android phone from any sender you name, the way a carrier SMS reaches the phone's apps. Your AI agent sends the verification code your backend would send, then reads the screen and finishes the sign-in, in the same `act` call over MCP or `POST /v1/phones/{id}/actions` over REST. The phone costs $0.01 a minute, billed per second.

[Start a phone](https://mobilebox.dev/signup?device=android_cloud&amp;via=need-sms-otp&via=md) [API reference](https://mobilebox.dev/docs/reference?via=md)

Sign up with GitHub, Google or email. New workspaces get free credit, no card.

## From the code your backend sends to a signed-in app.

Your test knows the code, so it sends it: no SIM, no shared inbox, no number to rent. The sender is up to 20 characters and the text up to 160, like one SMS.

[Test an Android app with Claude Code](https://mobilebox.dev/blog/claude-code-android-app-testing?via=md)

```
# Your app is on the phone and waiting for its code
curl -X POST https://mobilebox.dev/v1/phones/$ID/actions -H "Authorization: Bearer $MOBILESANDBOX_API_KEY" \
  -H "Content-Type: application/json" -d '{"actions": [
    {"type": "receive_sms", "from": "+15550100", "text": "Your Acme code is 482913"},
    {"type": "wait_for", "text": "Enter code"},
    {"type": "tap", "target": {"text": "Enter code"}},
    {"type": "type", "text": "482913"}
  ]}'
```

## Sending a test SMS to an Android phone

From each vendor’s own documentation, 2 December 2026.

| Where the phone runs | How a test SMS arrives | Price |
| --- | --- | --- |
| Mobilebox | receive_sms action over MCP or REST, any sender name or number | $0.01 a minute |
| Android Emulator on your machine | Emulator console: sms send <number> <text> | Free, on your own hardware |
| AWS Device Farm | Its FAQ: devices “do not have carrier connections and cannot make phone calls or send SMS messages” | Per device minute |

## Questions

SMS, one-time codes and 2FA.

How do I test an SMS verification code on a cloud Android phone?

Send it yourself: the action `{"type": "receive_sms", "from": "+15550100", "text": "Your code is 482913"}` delivers the message to the phone's apps, then your agent types the code or your app reads it. It works in the same `act` call as the taps that follow.

Can my app read the SMS itself?

Yes. An app with the SMS permission that listens for incoming messages gets it the way it gets one from a carrier.

What about codes from an authenticator app (TOTP)?

Save the site's 2FA key once under Settings → Logins in the dashboard. Your agent then types the current code with `{"type": "type", "login": "example.com", "field": "totp"}` and never sees the key.

Can a real service text the phone, on a real number?

Ask for it: your agent calls `request_capability` with the service and country it needed. Every ask is counted and shapes what we add next.

## Read more

[How can AI agents test mobile apps fast and simply? Four routes compared: a local MCP server (Maestro MCP, mobile-mcp, Appium MCP), a device cloud, a QA service, or a hosted phone with a first screenshot in 1.35 s and no SDK or Xcode. Includes a full Claude Code run. Decisions9 min read](https://mobilebox.dev/blog/test-mobile-apps-with-ai-agents?via=md) [Treat Android permission dialogs as part of the test Handle real consent and denial screens, choose runtime permission pre-grants deliberately and keep special permissions separate. Guides3 min read](https://mobilebox.dev/blog/android-permission-dialogs?via=md)

## Try it in your agent in 60 seconds

Paste this into Claude Code, Cursor, Codex or any agent that can read a web page. It asks for your email, gets its own key at once and adds the phone tools; the 6-digit code from your inbox keeps the workspace.

```
Set up Mobilebox for me: read https://mobilebox.dev/setup.md?via=test-sms-otp-android and follow it.
```

[What your agent reads](https://mobilebox.dev/setup.md?via=test-sms-otp-android)

## Next questions

- [Can my agent run 50 phones in parallel?](https://mobilebox.dev/blog/run-android-phones-in-parallel?via=next-parallel)

- [Can my agent use an iPhone?](https://mobilebox.dev/ios?via=next-iphone)

- [Can each phone get a residential IP?](https://mobilebox.dev/blog/residential-ip-per-phone?via=next-residential-ip)

- [Does my agent stay logged in between runs?](https://mobilebox.dev/blog/park-resume-android?via=next-logins)

- [Can I watch my agent work live?](https://mobilebox.dev/live-view?via=next-live)

- [What does it cost for a team?](https://mobilebox.dev/blog/mobilebox-pricing-for-teams?via=next-team)

- [How fast do cloud phones start, measured?](https://mobilebox.dev/benchmarks?via=next-benchmarks)

- [Is there a Python package?](https://mobilebox.dev/blog/android-phone-for-python-ai-agent?via=next-python)
