如何在smooch whatsapp模板中传递参数

时间:2019-05-20 10:35:42

标签: whatsapp smooch

我正在将smooch api用于whatsapp,并且试图在模板中传递参数,但是我不知道该怎么做。

我创建了一个模板,并将其列出

https://imgur.com/d0SnB1f

然后我尝试发送一个,并且可以发送,但是我不知道如何替换 { "role": "appMaker", "type": "text", "text": "%{{template: text_template_param}}%" }

"message": {
        "text": "Your order Client ID for a total of {{2}} is confirmed. The expected delivery is https://imgur.com/u7Ki1O1.",
        "type": "text",
        "role": "appMaker",
        "received": 1558094577.31,
        "authorId": "00ujdcf5pn6gtADts0h7",
        "avatarUrl": "https://www.gravatar.com/avatar/00000000000000000000000000000000.png?s=200&d=mm",
        "_id": "5cdea2f1b797060010402284",
        "source": {
            "type": "api"
        }
    },
https://docs.smooch.io/guide/whatsapp#sending-templated-messages

{{3}}

有人可以帮助我吗?

-

该呼叫是对{{url}} / {{apiVersion}} / apps / {{appId}} / appusers / {{appUserId}} /消息的POST

体内发送:

Client Secret

消息的发布方式如下:

{{2}}

我需要将文本access_token替换为变量,但是我不知道该怎么做。在文档中,我看到了:

{{3}},但我不工作;我不知道该在哪里放置“&[[欢迎鲍勃,我是乔](whatsapp:hsm:communications:smoochio,text_template_param,Bob,Joe,Eli)”

预先感谢

0 个答案:

没有答案