免註冊帳號,用即時沙盒金鑰試用 app2email WhatsApp API,再連接您自己的號碼、發送第一個範本、追蹤狀態並讀取回覆。
本指南分兩部分,帶您從零開始,發出一則 WhatsApp 訊息並收到對方的回覆。
第 1 部分,即時沙盒(約 2 分鐘,免註冊帳號): 您會取得一組示範號碼的金鑰,向一位虛擬客戶發送範本,看著它從已發送變成已讀,並讀取客戶的回覆。訊息不會真的送到 WhatsApp,但每個請求和回應的格式都與正式 API 相同,所以日後同一段程式碼可以直接沿用。
第 2 部分,您自己的號碼: 您註冊帳號、連接您的 WhatsApp 號碼、建立 API 金鑰,然後向真實的手機發送同類型的訊息。
客戶看到的內容(第 2 部分):一則來自您的企業名稱的 WhatsApp 訊息,例如「Ava 您好,您的訂單 #1234 已出貨。」對方回覆後,您可以在接下來的 24 小時內以一般文字回覆。
您看到的內容: 含有 message_id 的發送回應、該訊息的狀態(sent、delivered、read)、客戶的回覆(以 message.received 事件呈現),以及 app2email 活動記錄(Activity Log)和收件匣(Inbox)中的每一則訊息。
curl 的終端機,或 Node.js 18+,或安裝了 requests 的 Python 3.9+。不需要其他東西。| 權限範圍 | 在本指南中的用途 |
|---|---|
messages:send | 發送範本和回覆(POST /messages) |
messages:read | 列出您的範本(GET /templates)、讀取訊息狀態(GET /messages/{message_id})並取得事件(GET /events) |
webhooks:manage | 僅在您希望把事件推送到您的伺服器時需要(POST /webhooks) |
GET /me 只要金鑰有效即可使用,不論其權限範圍為何。
即時沙盒是一個示範用的 WhatsApp 號碼 12025550100,內有五位虛擬客戶,反應與真實客戶一樣。開始前不需要帳號,也不需要金鑰。
它提供的內容:
POST https://api.app2email.com/v1/account/sandbox,不帶金鑰也不帶內容,會回傳一組即時沙盒金鑰(a2es_...)。金鑰只顯示一次,有效期為 7 天,只能用於示範號碼。sandbox_recipient。hello_world(en_US,UTILITY)、order_update(en,UTILITY)和 weekend_offer(en,MARKETING)。它們由與真實範本相同的程式碼檢查。GET /me、GET /templates、POST /messages、GET /messages、GET /conversations、GET /conversations/{contact}、PUT /conversations/{contact}/owner、GET /events 和 POST /sandbox/inbound(讓虛擬客戶傳訊息給您)。其他任何呼叫都會回應 403 not_in_instant_sandbox。GET /events 取得,而不是 webhook。curl -X POST https://api.app2email.com/v1/account/sandboxconst res = await fetch("https://api.app2email.com/v1/account/sandbox", { method: "POST" });
const { instant_sandbox } = await res.json();
console.log(instant_sandbox.api_key, instant_sandbox.expires);import requests
res = requests.post("https://api.app2email.com/v1/account/sandbox", timeout=10)
sandbox = res.json()["instant_sandbox"]
print(sandbox["api_key"], sandbox["expires"])您會收到的回應(已簡化:回應中還會在 calls 和 try_first 列出可用的呼叫與建議先試的呼叫):
{
"success": true,
"request_id": "s4ndb",
"instant_sandbox": {
"api_key": "a2es_000qlA9iTHS1NETB9JExample...",
"expires": "2026-11-22T03:00:00.000Z",
"number": "12025550100",
"base_url": "https://api.app2email.com/v1/12025550100",
"mcp_url": "https://api.app2email.com/mcp",
"authorization": "Authorization: Bearer <api_key>",
"test_contacts": [
{ "number": "12025550101", "name": "Ava", "behaviour": "answers every message a few seconds later" },
{ "number": "12025550102", "name": "Ben", "behaviour": "reads, never answers: a free-form message to him is 422 outside_24h_window" },
{ "number": "12025550103", "name": "Cara", "behaviour": "delivery fails: message.status failed and message.failed" },
{ "number": "12025550104", "name": "Dan", "behaviour": "answers STOP: contact.opted_out, then a marketing template to him is 403 recipient_opted_out" },
{ "number": "12025550105", "name": "Eve", "behaviour": "asks for a person: set the conversation's owner to human" }
],
"templates": ["hello_world (en_US, UTILITY)", "order_update (en, UTILITY)", "weekend_offer (en, MARKETING)"],
"not_here": "Webhooks (use GET /events), media uploads, contacts, broadcasts in the background, scheduled sends and every other call need a connected number: they answer 403 not_in_instant_sandbox here."
},
"next": "For a real WhatsApp number call create_account with the person's e-mail address: they confirm, connect their number and choose a plan.",
"documentation_url": "https://www.app2email.com/docs/api/sandbox"
}請保存好 api_key:它不會再次顯示。如果遺失,請重新取得一把。下文中 SANDBOX_KEY 代表這把金鑰。快速確認它可用:以 Authorization: Bearer SANDBOX_KEY 呼叫 GET https://api.app2email.com/v1/12025550100/me。
GET /templates 會列出每個範本、它需要哪些值,以及一個完整的 example_request,您改好值後即可直接發送。
curl https://api.app2email.com/v1/12025550100/templates \
-H "Authorization: Bearer SANDBOX_KEY"const KEY = process.env.SANDBOX_KEY;
const API = "https://api.app2email.com/v1/12025550100";
const res = await fetch(`${API}/templates`, { headers: { Authorization: `Bearer ${KEY}` } });
const { templates } = await res.json();
for (const t of templates) console.log(t.name, t.language, t.status, t.needs);import os, requests
KEY = os.environ["SANDBOX_KEY"]
API = "https://api.app2email.com/v1/12025550100"
res = requests.get(f"{API}/templates", headers={"Authorization": f"Bearer {KEY}"}, timeout=10)
for t in res.json()["templates"]:
print(t["name"], t["language"], t["status"], t.get("needs"))每個項目都有 name、language、category、status、can_send、needs,已核准的範本還有 example_request。order_update 的內文需要兩個文字值:客戶姓名和訂單編號。
Ava(12025550101)會在幾秒後回覆每一則訊息。範本是您隨時都能發送的訊息,即使對方從未傳訊息給您也可以。
curl -X POST https://api.app2email.com/v1/12025550100/messages \
-H "Authorization: Bearer SANDBOX_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "12025550101",
"type": "template",
"template": {
"name": "order_update",
"language": { "code": "en" },
"components": [
{ "type": "body", "parameters": [
{ "type": "text", "text": "Ava" },
{ "type": "text", "text": "#1234" }
] }
]
}
}'const res = await fetch(`${API}/messages`, {
method: "POST",
headers: { Authorization: `Bearer ${KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
to: "12025550101",
type: "template",
template: {
name: "order_update",
language: { code: "en" },
components: [
{ type: "body", parameters: [{ type: "text", text: "Ava" }, { type: "text", text: "#1234" }] },
],
},
}),
});
const sent = await res.json();
console.log(res.status, sent.message_id, sent.status);res = requests.post(
f"{API}/messages",
headers={"Authorization": f"Bearer {KEY}"},
json={
"to": "12025550101",
"type": "template",
"template": {
"name": "order_update",
"language": {"code": "en"},
"components": [
{"type": "body", "parameters": [{"type": "text", "text": "Ava"}, {"type": "text", "text": "#1234"}]}
],
},
},
timeout=10,
)
sent = res.json()
print(res.status_code, sent.get("message_id"), sent.get("status"))您會收到的回應(HTTP 200,已簡化):訊息已被接受。text 是客戶看到的訊息內容。
{
"success": true,
"request_id": "kxrkf",
"message_id": "wamid.HBgLNjE0MTIzNDU2NzgVAgARGBJTQU1QTEVfVEVTVF9FVkVOVAA=",
"status": "accepted",
"from": "12025550100",
"to": "12025550101",
"template": { "name": "order_update", "language": "en", "category": "UTILITY" },
"text": "Hi Ava, your order #1234 has shipped."
}如果值有誤,會回傳帶有固定 error.code 和 how_to_fix 的錯誤,範本錯誤時還會附上完整正確的 example_request。不妨試試:少填一個參數,就會得到 422 template_parameters_invalid。
GET /events?wait=25 最多等待 25 秒以取得下一個事件,所以您不需要公開網址。您會先收到帶有 sent、delivered 和 read 的 message.status,接著收到帶有 Ava 回覆的 message.received。
curl "https://api.app2email.com/v1/12025550100/events?wait=25" \
-H "Authorization: Bearer SANDBOX_KEY"let after = "";
for (let i = 0; i < 5; i++) {
const q = after ? `&after=${encodeURIComponent(after)}` : "";
const res = await fetch(`${API}/events?wait=25${q}`, { headers: { Authorization: `Bearer ${KEY}` } });
const page = await res.json();
for (const e of page.events ?? []) console.log(e.type, e.data.status ?? e.data.text);
after = page.cursor ?? after;
}after = ""
for _ in range(5):
params = {"wait": 25, **({"after": after} if after else {})}
page = requests.get(f"{API}/events", params=params,
headers={"Authorization": f"Bearer {KEY}"}, timeout=40).json()
for e in page.get("events", []):
print(e["type"], e["data"].get("status") or e["data"].get("text"))
after = page.get("cursor", after)您會收到的回應(已簡化;Ava 的用字會有所不同):
{
"success": true,
"request_id": "e7fd2",
"events": [
{
"id": "evt_Xq3k9m2Lw8Rt5Yp1Zs01",
"type": "message.status",
"created": "2026-11-15T03:10:02.000Z",
"number": "12025550100",
"data": {
"message_id": "wamid.HBgLNjE0MTIzNDU2NzgVAgARGBJTQU1QTEVfVEVTVF9FVkVOVAA=",
"to": "12025550101",
"status": "delivered",
"timestamp": "2026-11-15T03:10:01.000Z",
"sent_by": "api"
}
},
{
"id": "evt_Ab7c2d9Ef4Gh6Jk8Lm03",
"type": "message.received",
"created": "2026-11-15T03:10:09.000Z",
"number": "12025550100",
"data": {
"message_id": "wamid.HBgLNjE0MTIzNDU2NzgVAgASGBQzQUZCMTY0MDc2MUYwNzBDNTY5MAA=",
"from": "12025550101",
"name": "Ava",
"type": "text",
"text": "Thanks! When will it arrive?",
"timestamp": "2026-11-15T03:10:08.000Z"
}
}
],
"count": 2,
"cursor": "ec_184467",
"has_more": false
}下次呼叫時,把 cursor 作為 after 傳入,就只會取得更新的事件。每個事件的 JSON 與日後 webhook 收到的相同,id 也相同。types=message.received 只會回傳收到的訊息。GET /messages 也會列出訊息,每則已發送的訊息都附有 status 和 times。
Ava 剛剛傳了訊息,所以她的 24 小時視窗已開啟,您可以發送自由格式的文字:
curl -X POST https://api.app2email.com/v1/12025550100/messages \
-H "Authorization: Bearer SANDBOX_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "12025550101", "type": "text", "text": {"body": "It arrives on Friday."}}'同樣的文字發給從未傳訊息的 Ben(12025550102),會回應 422 outside_24h_window:在視窗之外,只能發送範本。
| 客戶 | 發送給他們 | 您會學到什麼 |
|---|---|---|
Ben,12025550102 | 一則文字 | 他會已讀但從不回覆:自由文字會得到 422 outside_24h_window |
Cara,12025550103 | hello_world | 發送失敗:message.status 為 failed,以及 message.failed |
Dan,12025550104 | order_update,然後 weekend_offer | 他回覆 STOP:contact.opted_out,之後行銷範本會得到 403 recipient_opted_out |
Eve,12025550105 | 任何範本 | 她要求找真人:用 PUT /conversations/{contact}/owner 和 "owner": "human" 把對話轉交出去 |
改從 AI 助理操作,而不是終端機: 管理 MCP 伺服器 https://api.app2email.com/mcp/manage 有工具 create_sandbox,而且即時金鑰也適用於 MCP 伺服器 https://api.app2email.com/mcp(check_key、list_templates、send_template、list_events、wait_for_message 等)。請參閱讓 AI 代理透過 MCP 操作您的 WhatsApp和沙盒。
訊息能否真正發出,由 Meta 那一端決定:請為您的 WhatsApp Business Account 新增付款方式、完成企業認證,並讓您的顯示名稱通過審核。入門指南會帶您完成這些步驟。
在 API 金鑰頁面,建立一把具備 messages:send 和 messages:read 的金鑰(如果要使用 webhook,再加上 webhooks:manage)。金鑰(a2en_...)只顯示一次:請保存在您的伺服器上,絕不要放在網頁或日誌中。
如果想先在自己的號碼上測試,建立時請勾選 Sandbox key:所有檢查都會針對您的帳號執行,不會有任何內容送到 WhatsApp,回應中帶有 "sandbox": true,訊息 id 以 wamid.SANDBOX. 開頭,message.status 事件仍會送達。準備好真正發送時,請再建立一把不帶此標記的金鑰。
在每個請求中,YOUR_NUMBER 是您用來發送的 WhatsApp 號碼:國碼在前,只用數字。
curl https://api.app2email.com/v1/YOUR_NUMBER/me \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch("https://api.app2email.com/v1/YOUR_NUMBER/me", {
headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
console.log(await res.json());import os, requests
res = requests.get("https://api.app2email.com/v1/YOUR_NUMBER/me",
headers={"Authorization": f"Bearer {os.environ['API_KEY']}"}, timeout=10)
print(res.json())您會收到的回應:
{
"success": true,
"request_id": "a7k3p",
"key_valid": true,
"api_version": "v1",
"number": "4976659348270",
"plan": "standard_5000",
"service_status": "LIVE",
"key": { "name": "First message", "scopes": ["messages:read", "messages:send"], "ip_allow": "" },
"limits": { "max_numbers_per_request": 1000, "requests_per_second": 20, "burst": 50, "rate_limit_mode": "enforce", "webhooks_max": 5 }
}service_status 必須是 LIVE,而 key.scopes 必須列出您需要的權限範圍(或 * 代表完整存取)。沙盒金鑰還會顯示 "sandbox": true。
GET /v1/YOUR_NUMBER/templates 會列出您的範本。請選擇帶有 "status": "APPROVED" 和 "can_send": true 的範本,並複製它的 example_request。還沒有已核准的範本?請在儀表板的「範本」頁面建立一個,或參閱發送訂單和預約通知,了解如何透過 API 建立並取得核准。
把範本發送到您自己的手機號碼(不是企業號碼本身:發給企業號碼會回應 422 recipient_is_sender)。請加上 Idempotency-Key:如果逾時後重試,訊息不會被重複發送。
curl -X POST https://api.app2email.com/v1/YOUR_NUMBER/messages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: first-message-1" \
-d '{
"to": "61412345678",
"type": "template",
"template": {
"name": "order_update",
"language": { "code": "en" },
"components": [
{ "type": "body", "parameters": [
{ "type": "text", "text": "John" },
{ "type": "text", "text": "#1234" }
] }
]
}
}'const res = await fetch("https://api.app2email.com/v1/YOUR_NUMBER/messages", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": "first-message-1",
},
body: JSON.stringify({
to: "61412345678",
type: "template",
template: {
name: "order_update",
language: { code: "en" },
components: [
{ type: "body", parameters: [{ type: "text", text: "John" }, { type: "text", text: "#1234" }] },
],
},
}),
});
const sent = await res.json();
console.log(res.status, sent.message_id ?? sent.error);res = requests.post(
"https://api.app2email.com/v1/YOUR_NUMBER/messages",
headers={"Authorization": f"Bearer {os.environ['API_KEY']}", "Idempotency-Key": "first-message-1"},
json={
"to": "61412345678",
"type": "template",
"template": {
"name": "order_update",
"language": {"code": "en"},
"components": [
{"type": "body", "parameters": [{"type": "text", "text": "John"}, {"type": "text", "text": "#1234"}]}
],
},
},
timeout=10,
)
sent = res.json()
print(res.status_code, sent.get("message_id") or sent.get("error"))請使用您自己範本的名稱、語言和值(它的 example_request 中有這些資料)。您會收到的回應(HTTP 200):
{
"success": true,
"request_id": "kxrkf",
"message_id": "wamid.HBgLNjE0MTIzNDU2NzgVAgARGBJTQU1QTEVfVEVTVF9FVkVOVAA=",
"status": "accepted",
"from": "4976659348270",
"to": "61412345678",
"template": { "name": "order_update", "language": "en", "category": "UTILITY" },
"text": "Hi John, your order #1234 has shipped.",
"conversation_url": "https://www.app2email.com/conversation/61412345678_4976659348270_...",
"note": "accepted by WhatsApp. delivery and read status appear in your app2email Activity Log (WhatsApp sent).",
"contacts": [{ "input": "61412345678", "wa_id": "61412345678" }]
}在請求內容中加入 "dry_run": true,即可檢查所有項目(範本值、號碼、Do Not Call 名單、每月限額)而不實際發送。回應會顯示確切的 WhatsApp 訊息。不會發送、記錄或計數。
GET /messages/{message_id}(權限範圍 messages:read)會顯示訊息目前的進度。請對 id 進行 URL 編碼。
curl "https://api.app2email.com/v1/YOUR_NUMBER/messages/wamid.HBgLNjE0MTIzNDU2NzgVAgARGBJTQU1QTEVfVEVTVF9FVkVOVAA%3D" \
-H "Authorization: Bearer YOUR_API_KEY"您會收到的回應: status 是 accepted、sent、delivered、read、failed、deleted、queued 或 unknown 其中之一。尚未到達的步驟不會出現在 times 中,客戶回覆此訊息後會出現 reply。
{
"success": true,
"request_id": "p4n8w",
"message_id": "wamid.HBgLNjE0MTIzNDU2NzgVAgARGBJTQU1QTEVfVEVTVF9FVkVOVAA=",
"to": "61412345678",
"status": "read",
"sent_by": "api",
"text": "Hi John, your order #1234 has shipped.",
"times": {
"submitted": "2026-11-06T01:00:00Z",
"accepted": "2026-11-06T01:00:01Z",
"sent": "2026-11-06T01:00:02Z",
"delivered": "2026-11-06T01:00:04Z",
"read": "2026-11-06T01:12:40Z"
},
"conversation_url": "https://www.app2email.com/conversation/61412345678_4976659348270_..."
}在您的手機上回覆該則訊息。有兩種方式可以在程式碼中取得回覆:
GET /v1/YOUR_NUMBER/events?wait=25&types=message.received,與第 1 部分相同。在您自己的號碼上,第一次呼叫會開啟事件串流,之後事件會保留 72 小時。所以請在發送之前先用 after=now 呼叫一次,並保存 cursor。POST /v1/YOUR_NUMBER/webhooks 和 {"url": "https://your-server.example/webhook"} 註冊一次 webhook(權限範圍 webhooks:manage),或在 API 金鑰頁面的 Webhooks 下新增。之後 app2email 會把每個事件以簽署過的 POST 發送到您的網址。建立 WhatsApp 聊天機器人中有包含簽章檢查的完整接收程式。回覆會以 message.received 送達:
{
"id": "evt_Xq3k9m2Lw8Rt5Yp1Zs01",
"type": "message.received",
"created": "2026-11-06T01:00:00.000Z",
"number": "4976659348270",
"data": {
"message_id": "wamid.HBgLNjE0MTIzNDU2NzgVAgARGBJTQU1QTEVfVEVTVF9FVkVOVAA=",
"from": "61412345678",
"name": "John",
"type": "text",
"text": "Thanks! When will it arrive?",
"conversation_url": "https://www.app2email.com/conversation/61412345678_4976659348270_SAMPLEk3XbQ9rTzP2mW",
"timestamp": "2026-11-06T01:00:00.000Z"
}
}現在您可以用 "type": "text" 回覆,做法與第 1 部分完全相同,直到客戶最後一則訊息後的 24 小時為止。
message.status 事件:先是 sent,然後是 delivered,您開啟訊息時是 read。失敗的訊息會以帶有 status: "failed" 和 error 物件的 message.status 送達,同時也會以 message.failed 送達。message.received 送達,並開啟 24 小時視窗,可發送自由格式的回覆。每則訊息只發送一次。 為每個 POST /messages 提供一個專屬於該訊息的 Idempotency-Key,例如您的訂單編號加上事件。24 小時內以相同的金鑰發送相同的請求,會再次收到第一次的回應,並附有標頭 Idempotent-Replayed: true。相同的金鑰搭配不同的內容:422 idempotency_key_reused。
以事件的 id 去除重複。 事件可能再次出現:回應遺失後的 GET /events,以及重試後的 webhook 都可能發生。請把已處理的 id 至少保留兩天。
檢查 webhook 簽章。 每個 webhook 事件都有 X-App2email-Signature: t=<unix seconds>,v1=<hex>:以 t、一個點和原始請求內容為資料,以 webhook 的密鑰(whsec_...)為金鑰計算 HMAC-SHA256。請拒絕不相符或 t 過舊的事件。
遵守速率限制。 每個回應都有 X-RateLimit-Limit、X-RateLimit-Remaining 和 X-RateLimit-Reset。超過限制時會得到帶有 Retry-After 的 429 rate_limited:等待該段時間後再重試。若要把同一個範本發給許多號碼,請把它們放在同一次呼叫中,而不是每個號碼各呼叫一次。
24 小時視窗之外使用範本。 自由文字只在客戶最後一則訊息後的 24 小時內有效(app2email 會提早 15 分鐘停止)。其他情況都需要已核准的範本。
只傳訊息給同意的人。 行銷範本不會發送給 Do Not Call 名單上的號碼,而寫下 STOP 的客戶會被加入該名單(contact.opted_out)。發送尊重選擇加入的行銷群發中說明了同意的相關事項。
保護金鑰並縮小其權限。 金鑰只放在伺服器上,絕不放在網頁中。只給它需要的權限範圍,測試時使用沙盒金鑰。
| 您看到的情況 | 原因 | 解決方法 |
|---|---|---|
POST /v1/account/sandbox 回應 429 | 同一位址每小時取得超過 10 把即時沙盒金鑰 | 等待 Retry-After 秒,或繼續使用您已有的金鑰(有效期 7 天) |
401 missing_api_key、invalid_api_key、api_key_expired、api_key_revoked | 沒有金鑰、金鑰錯誤、已過期(即時沙盒金鑰的有效期為 7 天)或已被撤銷 | 以有效的金鑰發送 Authorization: Bearer YOUR_API_KEY;重新取得即時金鑰,或使用 API 金鑰頁面上的金鑰 |
403 api_key_number_mismatch | 金鑰屬於網址中號碼以外的另一個號碼 | 在網址中填入該金鑰自己的號碼。即時沙盒金鑰只能用於 12025550100 |
400 invalid_number_in_url | 網址中的號碼不是含國碼的純數字 | 使用完整號碼,只用數字,不加 + |
403 not_in_instant_sandbox | 示範號碼沒有這個呼叫(例如 webhook) | 在該處改用 GET /events,或使用您自己號碼上的沙盒金鑰 |
422 sandbox_recipient | 即時沙盒只會寫入它的虛擬客戶 | 發送到 12025550101 至 12025550105 |
403 plan_not_allowed、service_not_live | 沒有付費方案,或服務已暫停 | 選擇方案;已暫停的服務可在設定頁面按「Go Live」重新上線 |
403 insufficient_scope | 金鑰缺少某項權限(details.required_scope) | 建立一把具備 messages:send 和 messages:read 的金鑰 |
403 sandbox_key | 沙盒金鑰無法執行此操作(範本、設定、核准) | 此呼叫請使用不帶沙盒標記的金鑰 |
404 template_not_found、template_language_not_found | 範本名稱或語言有誤 | 從 GET /templates 複製兩者 |
422 template_not_approved | Meta 尚未核准該範本 | 等待核准,或選擇 can_send: true 的範本 |
422 template_parameters_invalid、template_parameter_count_mismatch | 值的數量或類型有誤 | 依照錯誤中的 details 和 example_request 修正 |
422 outside_24h_window | 對方在過去 24 小時內沒有傳過訊息,卻發送了自由文字 | 發送已核准的範本 |
422 recipient_is_sender | 您發送給企業號碼本身 | 發送到另一支手機 |
403 recipient_opted_out | 客戶在您的 Do Not Call 名單上 | 不要再向他們發送行銷訊息 |
403 whatsapp_payment_issue | 您的 WhatsApp Business Account 沒有有效的付款方式(Meta 錯誤 131042) | 在 WhatsApp Manager 的 Billing and payments 中新增付款方式 |
429 rate_limited | 此金鑰的呼叫次數過多 | 等待 Retry-After 秒,然後重試 |
在您自己的號碼上 GET /events 持續為空 | 事件串流從第一次呼叫才開始 | 發送之前先呼叫一次(after=now),然後再發送 |
每個回應都有 request_id。GET /requests/{id} 會顯示您自己的號碼上為它記錄的內容,support@app2email.com 也能查到。所有代碼請見錯誤。