Meta Tech Provider
WhatsApp 錯誤 131008:缺少必要參數
錯誤 131008 表示請求缺少必要參數。它比錯誤 100 更精準,也更有用,因為錯誤 100 泛指參數格式錯誤,而此錯誤明確指出欄位不存在,而不是內容有誤。
通常缺少甚麼
有些欄位看似可有可無,其實並非如此,所以同幾個欄位會不斷出現。
- messaging_product,每次發送都必須設定為 whatsapp。
- 需要此欄位的訊息格式中,recipient_type。
- 範本發送時的 language 物件,即使只有一種語言也必須提供。
- 定義變數的範本中的 components,空清單與省略欄位並不相同。
為甚麼這是好消息
因為這是這類錯誤中最明確的一種。錯誤 100 只表示某處的參數有誤,而此錯誤明確指出必要參數完全不存在,讓您可以把搜尋範圍縮小至端點的必要欄位清單。
修正方法是閱讀所呼叫端點的參考文件,並按其必要欄位核對請求。這只需一分鐘,也是值得在記錄中把此錯誤與 100 分開,而不是同樣歸類為錯誤請求的原因。
常見錯誤
- 把它與錯誤 100 視為相同。此錯誤指出欄位不存在,範圍更明確。
- 把空的 components 清單當作省略欄位。對 API 而言,兩者並不相同。
- 省略 messaging_product。每次發送都必須提供它,這是最常見的單一原因。
使用 EasyCoexistence 完成這項設定
EasyCoexistence 會返回建立請求所需的號碼 ID 和存取權杖,因此其中的值是 Meta 目前持有的值,而不是設定時抄錄的值。
常見問題
缺少哪個參數?
回應會指出缺少的參數。如沒有指出,端點參考文件會列出必要欄位清單。
messaging_product 真的必須提供嗎?
是,每次發送都必須設定為 whatsapp。這是最常見的省略欄位。
這與 100 相同嗎?
不相同。100 涵蓋存在但內容有誤的參數,此錯誤則涵蓋不存在的參數。
重試有幫助嗎?
沒有。請求結果是固定的,在加入欄位前每次都會出現相同錯誤。
繼續閱讀
WhatsApp error 100: invalid parameterError 100 means a parameter was unsupported, misspelled or malformed. It is the broadest error on the platform and it never clears by retrying.WhatsApp error 131009: invalid parameter valueError 131009 means a parameter was present with a value the endpoint does not accept. Common causes: locale codes, phone formats and enum values.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 Coexistence: the app and the API on one numberCoexistence runs the WhatsApp Business app and the Cloud API on the same number at once. What it changes, what it does not, and how a number gets connected.WhatsApp error 131051: unsupported message typeError 131051 means the message type is not supported. On a Coexistence number some types are unavailable, which is the common cause.WhatsApp Cloud API error codesEvery WhatsApp Cloud API error code in one table: what each one means, whether retrying helps, and the page that covers it in full.
準備開始嗎?
幾分鐘內設定 WhatsApp Coexistence,而非幾個月。應用程式在手機上仍可繼續運作。
開始免費試用驗證日期