WhatsApp Cloud API 錯誤代碼
這裡以一個表格列出我們記錄的所有 WhatsApp Cloud API 錯誤代碼,並說明每個代碼的意思及重試是否有用。大部分錯誤都沒有用,因為它們是確定性的。同一個請求會以相同方式失敗,重試迴圈只會把錯誤請求變成速率限制。
Request
| Code | What it means | Retry |
|---|---|---|
| 100 | A parameter is unsupported, misspelled or malformed. | No |
| 131008 | A required parameter was not included at all. | No |
| 131009 | A parameter is present with a value the endpoint rejects. | No |
| 131021 | Sender and recipient are the same number. | No |
| 131051 | The message type is not supported, often a Coexistence limit. | No |
| 131052 | Meta could not download media a customer sent. | No |
| 131053 | Meta could not upload media you sent. Size, format or reach. | No |
Template
| Code | What it means | Retry |
|---|---|---|
| 132000 | The number of parameters does not match the template. | No |
| 132001 | No template exists with that name and language pair. | No |
| 132007 | The template breaks messaging policy. Rewrite and resubmit. | No |
| 132012 | Parameter format does not match what the template defines. | No |
| 132015 | The template is paused after a quality decline. Temporary. | Wait |
| 132016 | The template is permanently disabled. It will not come back. | No |
Window and recipient
Registration and PIN
| Code | What it means | Retry |
|---|---|---|
| 131045 | The number was never registered for Cloud API messaging. | No |
| 133010 | The number is not registered. Registration must be completed. | No |
| 133006 | The number must be verified before it can be registered. | No |
| 133005 | The two-step verification PIN was wrong. Stop guessing. | No |
| 133008 | Too many PIN attempts. Registration is locked for a period. | Wait |
Access and account
| Code | What it means | Retry |
|---|---|---|
| 190 | The access token expired or was invalidated. | No |
| 368 | The account is restricted after a policy violation. | No |
| 131031 | The account is restricted, or its data does not match Meta's. | No |
| 131042 | A payment problem on the business account blocks sending. | No |
| 131049 | Meta blocked the message to protect ecosystem health. | No |
Rate limits
Transient
Coexistence sync
如何閱讀重試欄
這一欄有 3 個值,選錯是整份參考資料中代價最高的錯誤。
「否」表示失敗具確定性。出問題的是請求、範本或收件人的狀態;再次傳送完全相同的請求,只會得到相同錯誤,並消耗日後需要的傳輸容量。「是」表示問題出在 Meta 一方,退避重試確實可以解決。「等待」表示條件真實存在,但只是暫時性限制或鎖定,會自行解除。在解除前重試沒有作用,還可能延長限制。
為何大部分錯誤不能重試
因為平台會回傳具體代碼,而不是籠統代碼。參數格式錯誤、不存在的範本、已關閉的訊息視窗,以及已選擇退出的收件人,在回應當刻都可以判定,所以 Meta 會明確指出問題,而不是含糊地讓請求失敗。
- 請求有問題,第二次嘗試不會令它變正確。
- 範本有問題,問題存在於範本本身,請求無法改變它。
- 視窗或選擇退出的問題關乎收件人狀態,而不是您的狀態。
- 帳戶限制是一項決定,重試並不是申訴。
收到這些代碼時要記錄甚麼
記錄足夠資料,讓您無需重現問題也能診斷。這是 5 分鐘修復與整天猜測之間的分別。
- 完整錯誤回應,包括追蹤 ID,因為 Meta 支援會要求這項資料。
- 實際傳送的請求主體,而不是您原本打算傳送的內容。兩者之間的差異通常就是錯誤所在。
- 號碼 ID,讓您分辨單一號碼的問題與整個帳戶的問題。
- 時間戳記,讓您可以核對該刻連接的狀態。
只存在於 Coexistence 的代碼
其中有 2 個。它們看起來像普通的傳送失敗,因此容易令人混淆。2593107 和 2593108 都與聊天記錄同步有關,也就是首次連接號碼時,從 WhatsApp Business 應用程式複製最近對話的步驟。
它們不是訊息錯誤,也不代表連接失敗。同步超出限制或在時限外執行時,號碼仍會保持連接並正常傳送,只是複製的記錄少於預期。若將它們理解為連接故障,便可能斷開連接後重新開始,結果只會遺失更多記錄,而不是恢復記錄。
常見問題
哪些錯誤應該重試?
131016 和 131000,配合指數退避。130429、132015 和 133008 在等待後會自行清除。其他錯誤都具確定性。
錯誤代碼是否代表我的號碼已斷開連接?
通常不是。大部分錯誤與請求、範本或收件人有關。連接問題會以帳戶及品質 Webhook 顯示,而不是傳送錯誤。
甚麼是追蹤 ID?
錯誤回應中的識別碼,讓 Meta 支援找出特定請求。每次失敗都應記錄;沒有它,支援工單便無法處理。
這些代碼在每個供應商都相同嗎?
是。它們來自 Meta 的 Cloud API,因此無論由哪個供應商連接號碼,代碼都相同。供應商只能改變錯誤通知您時的清晰程度。
準備開始嗎?
幾分鐘內設定 WhatsApp Coexistence,而非幾個月。應用程式在手機上仍可繼續運作。
開始免費試用7 天內不收取任何費用。隨時取消。