Meta Tech Provider
WhatsApp 錯誤 132012:訊息範本參數格式不符
錯誤 132012 表示傳送的參數值與訊息範本所定義的格式不符。包含 3 個變數的訊息範本需要不多不少的 3 個參數,順序及類型亦要正確;任何偏差都會導致此錯誤,而不會只傳送部分訊息。
哪些內容必須一致
全部都要一致,而且不會提示。不存在部分匹配。
- 數量:內文有 3 個佔位符,即需要 3 個內文參數,不多不少。
- 順序:參數按位置排列,因此交換兩個參數會令傳送訊息的值放錯位置;若類型不同,則會產生此錯誤。
- 類型:貨幣或日期參數有指定的物件結構,不能以純文字傳送。
- 元件:標題、內文及按鈕參數分屬不同清單,不能合併為一個清單。
導致正式環境中斷的編輯
編輯訊息範本的人,往往不是呼叫 API 的人。有人為了讓訊息更清晰而加入變數,訊息範本重新獲批後,所有來自未修改整合的傳送便開始失敗。
與其事後發現,不如預先防範。訂閱訊息範本狀態 Webhook 後,編輯會以事件形式送達;將訊息範本的變數數量視為整合規格,並在變更時審查,就能避免文字改善演變成服務中斷。
常見錯誤
- 為了預防問題而傳送額外參數。過多與過少同樣錯誤。
- 把位置參數當作具名參數處理。它們只會按位置配對。
- 編輯訊息範本時沒有檢查負責傳送的程式碼。
使用 EasyCoexistence 完成這項設定
EasyCoexistence 會將訊息範本狀態事件傳送至您的端點,因此 Business Manager 中有人編輯訊息範本時,您可在下一次傳送失敗前得知。
常見問題
我要傳送多少個參數?
數量必須與訊息範本定義的完全相同,並按順序傳送。
可以傳送額外參數嗎?
不可以。過多參數與過少參數一樣會失敗。
為甚麼突然開始出現這個問題?
通常是因為訊息範本經過編輯,變數數量有所改變。
參數有名稱嗎?
沒有。參數按位置配對,因此順序很重要。
繼續閱讀
WhatsApp error 132000: parameter count mismatchError 132000 means the number of variables you sent does not match the number the template defines. How to count them and why it appears after an edit.WhatsApp error 132001: template does not existError 132001 means the template name and language pair you sent does not exist or is not approved. The language code is the usual cause.WhatsApp message templatesWhat templates are, the three categories, how variables work, how review goes, and why on Coexistence they can only be sent through the API.The message_template_status_update webhookMeta reports template approvals, rejections and disabling here. What each status means and why it removes the need to poll.WhatsApp error 132016: template is permanently disabledError 132016 means the template has been permanently disabled, usually after sustained negative feedback. Why approval is not permanent.WhatsApp error 131056: too many messages to one recipientError 131056 means too many messages were sent between your number and one recipient in a short period. What the pair rate limit protects against.
準備開始嗎?
幾分鐘內設定 WhatsApp Coexistence,而非幾個月。應用程式在手機上仍可繼續運作。
開始免費試用驗證日期