Getting a problem while sending the whatsapp flow as a template with the data - Stack Overflow

I am sending a template with a flow, and I want to send a payload. Therefore it needs to exchange data

I am sending a template with a flow, and I want to send a payload. Therefore it needs to exchange data to initialize the flow. It gives me below error. Also someone reported the issue in meta also check this link. Does anyone have idea how to fix this issue?

Request URL 
.0/{{Phone-Number-ID}}/messages

Request Body

{
    "messaging_product": "whatsapp",
    "to": "4234234234",
    "type": "template",
    "template": {
        "name": "order_completation_without_registered_user",
        "language": {
            "code": "en_US"
        },
        "components": [
            {
                "type": "button",
                "sub_type": "flow",
                "index": "0",
                "parameters": [
                    {
                        "type": "action",
                        "action": {
                            "flow_token": "234234234",
                            "flow_action_data": {
                                "is_registered_user": true
                            }
                        }
                    }
                ]
            }
        ]
    }
}

Below Error

{
    "error": {
        "message": "(#131009) Parameter value is not valid",
        "type": "OAuthException",
        "code": 131009,
        "error_data": {
            "messaging_product": "whatsapp",
            "details": "Unexpected key \"flow_action_payload\" when \"flow_action\" is \"data_exchange\"."
        },
        "fbtrace_id": "AnVLLVsSsEu7O6HPeKeem85"
    }
}

I am sending a template with a flow, and I want to send a payload. Therefore it needs to exchange data to initialize the flow. It gives me below error. Also someone reported the issue in meta also check this link. Does anyone have idea how to fix this issue?

Request URL 
https://graph.facebook/v21.0/{{Phone-Number-ID}}/messages

Request Body

{
    "messaging_product": "whatsapp",
    "to": "4234234234",
    "type": "template",
    "template": {
        "name": "order_completation_without_registered_user",
        "language": {
            "code": "en_US"
        },
        "components": [
            {
                "type": "button",
                "sub_type": "flow",
                "index": "0",
                "parameters": [
                    {
                        "type": "action",
                        "action": {
                            "flow_token": "234234234",
                            "flow_action_data": {
                                "is_registered_user": true
                            }
                        }
                    }
                ]
            }
        ]
    }
}

Below Error

{
    "error": {
        "message": "(#131009) Parameter value is not valid",
        "type": "OAuthException",
        "code": 131009,
        "error_data": {
            "messaging_product": "whatsapp",
            "details": "Unexpected key \"flow_action_payload\" when \"flow_action\" is \"data_exchange\"."
        },
        "fbtrace_id": "AnVLLVsSsEu7O6HPeKeem85"
    }
}
Share Improve this question asked Mar 6 at 15:50 OnPrint CloudOnPrint Cloud 12 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Did you create the flow templates with "flow_action": "data_exchange"? In that case, you can't pass flow_action_data when sending the template as the flow will populate the initial data from your endpoint anyway.

If you need to include some data during sending the template, you can encode it the flow_token or store it in your backend in advance.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744964546a4603594.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信