生产准备流动基础设施HTTPS API · Android & iOS · Documented end to end探索平台
石窟画ZQQQ8Z- 第一位建筑安全设备配对交付可见度多设备控制已版本文件
开发者枢纽/WhatsApp API

WA · 7 documented operations

WhatsApp API documentation

Send WhatsApp messages and media, retry failures, synchronize inbound messages and verify recipient numbers.

Connected phones synchronizing conversations and media
REST base URLhttps://api.smsmobileapi.com

JSON responses · HTTPS required · UTF-8

Connect your API key

Connect once, then test endpoints across SMS, calls, notifications, WhatsApp and email.

从这里开始

Your first request in four steps

1

Connect and enable WhatsApp for a supported mobile.

2

Confirm the recipient with the number-check endpoint.

3

Send with waonly=yes.

4

For inbound messages, activate retrieval, synchronize, then call /getwa.

The secure SMSMobileAPI mobile app connecting a phone to the web dashboard and REST API for SMS and call operations
Encrypted mobile-to-platform connection

Official mobile application

The secure bridge between your phone, dashboard and API.

SMS and call operations pass through the official SMSMobileAPI app installed on your connected phone. The app securely pairs the device with your account, synchronizes authorized events and links the mobile network to the dashboard and REST API.

1Mobile appPairs the phone and its SIM 2Encrypted linkAuthenticates and protects data in transit 3Dashboard & APIControls workflows and activity
  • Signed releases distributed through the official Google Play and Apple App Store listings
  • Google and Apple platform review, signing and distribution controls
  • Secure device pairing, HTTPS transport and authenticated API access
  • Only the permissions required for the mobile features you enable
Get the official SMSMobileAPI app on Google Play Download the official SMSMobileAPI app on the Apple App Store
Capabilities depend on the permissions and background access allowed by Android or iOS.

验证

Keep credentials on your server

Use apikey for direct integrations. OAuth2 client credentials are available for server-side applications; request a token and send it as Authorization: Bearer ACCESS_TOKEN.

POST · GET

Send a WhatsApp message

#
ENDPOINThttps://api.smsmobileapi.com/sendsms

Sends a WhatsApp text or supported media through the connected environment.

When to use it

Use it for individual recipients or a dashboard contact group.

参数

姓名类型Requirement描述
apikey 细绳 必需的 Your API key; omit when using a Bearer token.
recipients phone 必需的 Country code plus number, without + or 00.
message 细绳 必需的 Text body; multiple lines are supported.
waonly 是的 必需的 Must be yes to request WhatsApp-only delivery.
url_media HTTPS URL 选修的 Public PDF, document, archive or JPG/PNG URL.
url_media_shorted 是的 选修的 Use a shortened download URL with PDF preview mode.
pdf_with_image 是的 选修的 Add an image preview for a PDF.
encrypt_message 是的 选修的 Require recipient-side decryption.
contactGroup GUID 选修的 Send to every contact in a dashboard group.

Request example

cURL
curl -X POST "https://api.smsmobileapi.com/sendsms?waonly=yes" \
  -d "apikey=YOUR_API_KEY" \
  -d "recipients=191728660" \
  --data-urlencode "message=Your order is ready."

示例回复

JSON
{
  "result": {
    "error": 0,
    "sent": "1",
    "id": "MESSAGE_GUID",
    "send_with_whatsapp": "1"
  }
}

Want to run this request? Connect your API key at the top of the page to unlock the interactive tester.

Connect key ↑
Good to know
  • Supported media URLs must be public HTTPS resources.
  • WhatsApp formatting: *bold*, _italic_, ~strikethrough~ and triple-backtick monospace.
POST · GET

Resend an unsent WhatsApp message

#
ENDPOINThttps://api.smsmobileapi.com/resendwa/

Retries a WhatsApp message that currently has an error status.

When to use it

Use it after diagnosing a failed WhatsApp log entry.

参数

姓名类型Requirement描述
apikey 细绳 必需的 您的 API 密钥。
guid 细绳 必需的 GUID of the failed message.

Request example

cURL
curl "https://api.smsmobileapi.com/resendwa/?apikey=YOUR_API_KEY&guid=MESSAGE_GUID"

Want to run this request? Connect your API key at the top of the page to unlock the interactive tester.

Connect key ↑
Good to know
  • Only failed messages are eligible for resend.
得到

Activate inbound retrieval

#
ENDPOINThttps://api.smsmobileapi.com/getwa/active/

Activates, deactivates or toggles WhatsApp message retrieval.

When to use it

Call it once before using inbound WhatsApp synchronization.

参数

姓名类型Requirement描述
apikey 细绳 必需的 您的 API 密钥。
statut 0 | 1 | x 选修的 1 activates, 0 deactivates, x or omission toggles the current state.

Request example

cURL
curl "https://api.smsmobileapi.com/getwa/active/?apikey=YOUR_API_KEY&statut=1"

示例回复

JSON
{
  "success": true,
  "read_message_active": 1,
  "status_note": "Activated"
}

Want to run this request? Connect your API key at the top of the page to unlock the interactive tester.

Connect key ↑
Good to know
  • Inbound retrieval is disabled by default for privacy.
得到

Synchronize inbound messages

#
ENDPOINThttps://api.smsmobileapi.com/getwa/synchronisation/

Requests a fresh WhatsApp synchronization before retrieval.

When to use it

Call it immediately before /getwa when your application needs current inbound data.

参数

姓名类型Requirement描述
apikey 细绳 必需的 您的 API 密钥。

Request example

cURL
curl "https://api.smsmobileapi.com/getwa/synchronisation/?apikey=YOUR_API_KEY"

示例回复

JSON
{
  "error": "0",
  "messages": "synchronized",
  "expire_at": "2026-03-11 12:27:00",
  "expire_at_unix": "1773232020"
}

Want to run this request? Connect your API key at the top of the page to unlock the interactive tester.

Connect key ↑
Good to know
  • Synchronization is for receiving messages only. Do not call it before sending.
得到

Retrieve WhatsApp messages

#
ENDPOINThttps://api.smsmobileapi.com/getwa

Returns synchronized inbound WhatsApp messages.

When to use it

Use it after activating and synchronizing inbound retrieval.

参数

姓名类型Requirement描述
apikey 细绳 必需的 您的 API 密钥。
before Unix timestamp 选修的 Return records before this timestamp.
date YYYY-MM-DD 选修的 Return records for one date.
message_type text | audio 选修的 Filter text messages or audio messages converted to text; omit for both.

Request example

cURL
curl "https://api.smsmobileapi.com/getwa/?apikey=YOUR_API_KEY&message_type=text"

示例回复

JSON
{
  "date": "2026-03-11",
  "hour": "12:27:00",
  "timestamp": "1773232020",
  "number": "19176728660",
  "contact": "SMSMobileAPI",
  "message": "When will I receive my order?",
  "guid": "652fcfc0-12a8-46f5-b5ba-9391135b8b4c"
}

Want to run this request? Connect your API key at the top of the page to unlock the interactive tester.

Connect key ↑
得到

Check a WhatsApp number

#
ENDPOINThttps://api.smsmobileapi.com/whatsapp/checknumber/

Checks whether a phone number is available on WhatsApp.

When to use it

Use it before sending to reduce avoidable failures.

参数

姓名类型Requirement描述
apikey 细绳 必需的 您的 API 密钥。
recipients phone 必需的 Country code plus number, without + or 00.

Request example

cURL
curl "https://api.smsmobileapi.com/whatsapp/checknumber/?apikey=YOUR_API_KEY&recipients=19176728660"

示例回复

JSON
{
  "contact_found_on_whatsapp": "yes",
  "recipients": "19176728660"
}

Want to run this request? Connect your API key at the top of the page to unlock the interactive tester.

Connect key ↑
邮政

Create an OAuth2 access token

#
ENDPOINThttps://api.smsmobileapi.com/oauth2/token

Exchanges client credentials for a Bearer token.

When to use it

Use it for server-to-server integrations where short-lived credentials are preferred.

参数

姓名类型Requirement描述
grant_type 细绳 必需的 Must be client_credentials.
client_id 细绳 必需的 Client ID from the dashboard.
client_secret 细绳 必需的 Client secret from the dashboard.

Request example

cURL
curl -X POST "https://api.smsmobileapi.com/oauth2/token" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials" \
  -d "client_id=YOUR_CLIENT_ID" \
  -d "client_secret=YOUR_CLIENT_SECRET"

Want to run this request? Connect your API key at the top of the page to unlock the interactive tester.

Connect key ↑
Good to know
  • Keep the client secret on your server. Never include it in mobile or browser code.

故障排除

Errors and safe retries

Read the HTTP status and the JSON error field before retrying. Do not retry validation or authentication failures without correcting the request first.

HTTP代码What to do
400missing_parameterA required parameter is empty or absent. Check the parameter table for the endpoint.
403invalid_apikeyThe API key is unknown, expired or not authorized for the requested feature.
429too_many_requestsRequests are arriving too quickly. Wait, then retry with exponential backoff.
500server_errorThe service could not complete the request. Keep the response and contact support if it persists.
Retry ruleRetry only transient 429 and 5xx responses. Start after 1 second, then back off to 2, 4 and 8 seconds.

需要帮助吗?

Bring the request context—not your secrets.

Share the endpoint, timestamp, HTTP status and sanitized response. Never include API keys, tokens or private message content.

Contact API support →